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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Timestamp

Morning All,

Could anyone assist with converting the time stamp in the attached document to a date.

Thanks

H

1 Solution

Accepted Solutions
its_anandrjs
Champion III
Champion III

Use this script

LOAD

[Time Stamp],

Date(Timestamp#([Time Stamp],'MM/DD/YYYY h:mm:ss TT'),'MM/DD/YYYY') as Date

FROM

[Time Stamp.xlsx]

(ooxml, embedded labels, table is Sheet1);

View solution in original post

14 Replies
pradnyat
Creator
Creator

Do you want to extract the date from timestamp or you want to change the data type?

Not applicable
Author

Hi Herbert,

floor(date(dateField,'DD/MM/YYYY')) as newDate

if it is in text format then,

floor(date(date#(DateField,'DD/MM/YYYY hh:mm:ss'),'DD/MM/YYYY')) as newDate

Not applicable
Author

Hi Pradnya,

I need to extract the date. Please see the attached Excel file for the raw data.

Thank you

its_anandrjs
Champion III
Champion III

Try like

Load

[Time Stamp],

Date( Time#([Time Stamp],'MM/DD/YYYY h:mm:ss TT'),'MM/DD/YYYY') as Date

From Location;

Not applicable
Author

Thanks Anand,

This is the closest answer so far, as it actually produces a date. Problem however is that its giving dates in the year 1899. My data is 2014 data.

Any suggestions?

Thanks

Not applicable
Author

Try this,

floor(date(date#([Time Stamp],'DD/MM/YYYY hh:mm:ss TT'),'DD/MM/YYYY')) as newDate

Change num to date from properties>Number>Date

its_anandrjs
Champion III
Champion III

Use this script

LOAD

[Time Stamp],

Date(Timestamp#([Time Stamp],'MM/DD/YYYY h:mm:ss TT'),'MM/DD/YYYY') as Date

FROM

[Time Stamp.xlsx]

(ooxml, embedded labels, table is Sheet1);

amit_saini
Master III
Master III

Please see the attachment.

Thanks,
AS