Colon in time in table | Sololearn: Learn to code for FREE!
Neuer Kurs! Jeder Programmierer sollte generative KI lernen!
Kostenlose Lektion ausprobieren
+ 1

Colon in time in table

How to convert char type time data into time format of hh:mm when showing in table from database? I’m using like below code String sql= select EMPCD,to_char(dat,mm/dd)dat,ontimestr,ontimeend from emp table; Start time and end time are inserted into table as a char

4th Aug 2020, 12:13 AM
Some Information Just for You
Some Information Just for You - avatar
2 Antworten
+ 1
Why you use CHAR type when you could've used TIME type? is there a benefit of choosing CHAR over TIME?
4th Aug 2020, 2:24 PM
Ipang
+ 1
thank you for your answer.yeah thought came later but i went with manually that i created.so i dont wanna change with that 😅😅 .for temporary i got the solution.i used substr( || ) to get colon in between time of type char.
6th Aug 2020, 3:12 AM
Some Information Just for You
Some Information Just for You - avatar