Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
brijeshvma
Partner - Creator
Partner - Creator

Want time value in list box like month..

Hi EveryOne i have Column Cotaining Timestamp date field

21/4/2012 4:30:00AM

21/4/2012 5:30:00AM

21/4/2012 6:30:00AM

22/4/2012 4:30:00AM

22/4/2012 5:30:00AM

22/4/2012 6:30:00AM

22/4/2012 7:30:00AM


i want to get only

4:30AM

5:30AM

6:30AM


as a Column only once.. so can use as filter on dashboard..

If i am using Time(Timestampfield , ,'hh:mm[.fff] TT')  ... so i am Getting as a multiple time


4:30AM

5:30AM

6:30AM

4:30AM

5:30AM

6:30AM



... I want like Month... when we fetch month from date field it given only Jan , Feb, Mar... still when multiple date for jan.



kinldy help me to get Time Column so that its shows only one for each time... so when user select say..4:30 AM... It fetch

21/4/2012 4:30:00AM

22/4/2012 4:30:00AM

1 Solution

Accepted Solutions
sunny_talwar

Sample using your data.

Script:

Table:

LOAD *,

  Time(Frac(TimeStamp#(TimeStampField, 'DD/M/YYYY h:mm:ssTT')), 'h:mmTT') as TimeField,

  Date(Floor(TimeStamp#(TimeStampField, 'DD/M/YYYY h:mm:ssTT'))) as DateField;

LOAD * Inline [

TimeStampField

21/4/2012 4:30:00AM

21/4/2012 5:30:00AM

21/4/2012 6:30:00AM

22/4/2012 4:30:00AM

22/4/2012 5:30:00AM

22/4/2012 6:30:00AM

22/4/2012 7:30:00AM

];


Capture.PNG

View solution in original post

5 Replies
sunny_talwar

Try it with Frac:

Time(Frac(TimeStamp#(TimeStampField, 'DD/M/YYYY h:mm:ssTT')), 'h:mmTT') as TimeField

sunny_talwar

Sample using your data.

Script:

Table:

LOAD *,

  Time(Frac(TimeStamp#(TimeStampField, 'DD/M/YYYY h:mm:ssTT')), 'h:mmTT') as TimeField,

  Date(Floor(TimeStamp#(TimeStampField, 'DD/M/YYYY h:mm:ssTT'))) as DateField;

LOAD * Inline [

TimeStampField

21/4/2012 4:30:00AM

21/4/2012 5:30:00AM

21/4/2012 6:30:00AM

22/4/2012 4:30:00AM

22/4/2012 5:30:00AM

22/4/2012 6:30:00AM

22/4/2012 7:30:00AM

];


Capture.PNG

brijeshvma
Partner - Creator
Partner - Creator
Author

Hi Sunny,

Thanks for Ur Reply ... Ur Script work for Inline But When i Load My QVD and Connecting with Calander ..Its not Happening as well Master Calander not able to Connect Correctly...Kinldy Help Me for the same.

sunny_talwar

Try the attached

brijeshvma
Partner - Creator
Partner - Creator
Author

Thankss Sunny for ur help ......