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: 
Not applicable

Time format

Hi All,

Time should be shown as 1-2AM, 2-3AM similarly till 22-23PM 23-24

Please help me with this.

Thanks,

Keerthi KS

1 Solution

Accepted Solutions
avinashelite

check this attachment

View solution in original post

25 Replies
robert_mika
Master III
Master III

What is your base data?

senpradip007
Specialist III
Specialist III

Can you share sample data?

Not applicable
Author

Date and Time

2014-12-31 06:23:46.480

2015-01-01 04:34:51.893

2015-01-05 08:33:49.000

avinashelite

Hi Keerthi,

Please find the attachment for the solution

sunny_talwar

May be this:

Table:

LOAD *,

  Time(Floor(Time, 1/24), 'h') &'-' & Time(Ceil(Time, 1/24), 'h TT') as TimeRange;

LOAD [Date and Time],

  Time(Frac([Date and Time])) as Time,

  Date(Floor([Date and Time])) as Date;

LOAD * Inline [

Date and Time

2014-12-31 06:23:46.480

2015-01-01 04:34:51.893

2015-01-05 08:33:49.000

];

Output in Table Box:

Capture.PNG

Not applicable
Author

Thanks a lot Avinash.

Please send for the below format

6-9AM
9-10AM
10-11AM
11- 12N
12-1PM
1-2PM
2-3PM
3-4PM
4-5PM
5-6PM
6-7PM
7-8PM
8-9PM
9PM -12AM
12-6AM
sunny_talwar

May be something like this for customized ranges:

Table:

LOAD *,

If(Time <= (6/24), '12-6 AM',

  If(Time <= (9/24), '6-9AM',

  If(Time <= (21/24), Time(Floor(Time, 1/24), 'h') &'-' & Time(Ceil(Time, 1/24), 'h TT'), '9-12PM'))) as TimeRange;

LOAD [Date and Time],

  Time(Frac([Date and Time])) as Time,

  Date(Floor([Date and Time])) as Date;

LOAD * Inline [

Date and Time

2014-12-31 06:23:46.480

2015-01-01 04:34:51.893

2015-01-05 08:33:49.000

];

avinashelite

please find the attachment for the solution

Not applicable
Author

Hi Sunny,

Please find the attached QVW.

I am not able to get the Time Range.

Its showing but dates are not matching.

Please help me with this.

Regards,

Keerthi KS