Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Only at Qlik Connect! Guest keynote Jesse Cole shares his secrets for daring to be different. Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
Kohli
Creator II
Creator II

Change the Time Format.

Hi team, I have to change the time format of a coloum, I have table like

Arrival time, Departure Time

1125, 1150

1210, 1230

1045, 1100

0900, 0930

2210, 2310

i want change the Time format like

Arrival, Departure

11:25, 11:50

12:10, 12:30

10:45, 11:00

09:00, 09:30

22:10, 23:10

5 Replies
jaumecf23
Creator III
Creator III

Hi,

Try the following code:

Table1:

Load*,

Date(Date#([Arrival time],'HHmm'),'HH:mm') as [Arrival time New],

Date(Date#([Departure Time],'HHmm'),'HH:mm') as [Departure Time New]

;

LOAD * INLINE [

Arrival time, Departure Time

1125, 1150

1210, 1230

1045, 1100

0900, 0930

2210, 2310

];

Thanks,

Kohli
Creator II
Creator II
Author

Thank you jaume, there is any chance to convert 24 hours format to 12 hours format.

jaumecf23
Creator III
Creator III

For 12 hours format, use this code:

Date(Date#([Arrival time],'HHmm'),'HH:mm TT') as [Arrival time New],

Date(Date#([Departure Time],'HHmm'),'HH:mm TT') as [Departure Time New]

vkozlov
Partner - Creator
Partner - Creator

bro, change format to 'HH:mm tt'

OmarBenSalem

Time to close the thread by marking the correct answer as correct.