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

Announcements
Join us in NYC Sept 4th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Date and Time Stamp Question

Hi All,

I am new to qlikview. I am stuck at a point and need your help. Really sorry that I cant share the complete data and dashboard because of the security concerns.

I have Timestamp in the format "20151216091842" and now I need to split this into two parts, First 8 digits ad Date, and rest of the digits as Time i.e 20151216 as Date and 091842 as Time.

Thanks a lot for your help,

Prasant Tata

1 Solution

Accepted Solutions
6 Replies
Chanty4u
MVP
MVP

=Date(Floor(Timestamp#('20151216091842','MMDDYYYY  hhmmss TT')))

or

=Date(Floor(Timestamp#(YourTimeStampFieldName,'MM/DD/YYYY  h:mm:ss TT')))

for time

=Time(Frac(Timestamp#(YourTimeStampFieldName,'MM/DD/YYYY  h:mm:ss TT')))

Not applicable
Author

Hey Suresh,

Thanks for your reply.

I tried this but it didnt workout. Attaching the sample application.

vcanale
Partner - Creator II
Partner - Creator II

Hi,

Try:
=Date( Date#(Left('20151216091842',8), 'YYYYMMDD'), 'YYYY-MM-DD')     //-->Date

=Time( Time#(Right('20151216091842',6), 'hhmmss'), 'hh:mm:ss')     //-->Time

Regards

Chanty4u
MVP
MVP

hi.,

PFA

PradeepReddy
Specialist II
Specialist II

try like this..

=date(Timestamp#(timestamp_field,'YYYYMMDDhhmmss'))

=time(Timestamp#(timestamp_field,'YYYYMMDDhhmmss'))

sunny_talwar

Try this:

Date

=Date(Floor(Timestamp#(TimeStamp,'YYYYMMDDhhmmss')))

Time

=Time(Frac(Timestamp#(TimeStamp,'YYYYMMDDhhmmss')))

Capture.PNG