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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
jasmeenkr
Contributor
Contributor

Extract time from dateTime field

Hi all,

 

I have requirement to get Time only from DateTime field which has values in format M/DD/YYYY hh:mm:ss TT

 

How to achieve it?

Labels (1)
4 Replies
sunny_talwar
MVP
MVP

May be this

Time(Frac(DateTimeFieldName)) as Time
jasmeenkr
Contributor
Contributor
Author

It gives me integer number . I have used subfield function to get time part. 

My next step is to join it to DimTime which has hour column of type varchar 12:00 AM/PM.

How to make join work

jasmeenkr
Contributor
Contributor
Author

I added Time(Frac(DateTime),'h:mmTT') as TimeSk in Fact. Now when i join it with DimTime TimeSk,

I am getting wrong bargraph as attached

 

Any help appreciated

sunny_talwar
MVP
MVP

Difficult to know without a sample file to look at