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: 
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 (4)
4 Replies
sunny_talwar

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

Difficult to know without a sample file to look at