Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Time Conversion

the raw data I got for time is something like 41271.378252315, how can I convert it to the date time format like "01/01/2013 05:01:33 am"?

4 Replies
Not applicable
Author

Hi,

You should use the date() function, ex.

Date(41271.378252315, 'DD/MM/YYYY hh:mm:ss TT')

or

Date(41271.378252315, '$(TimestampFormat)') TimestampFormat is a QV System variable, it's define the full date time format. (See the script)

Regards,

Ricardo

Not applicable
Author

Hi,

Have you tried using the date function? For instance

=date(41271.378252315) returns 12/28/2012

See attached.

Hope that helps.

Matt

montgomery7aust
Partner - Contributor II
Partner - Contributor II

Hi Kelly,

You have a couple of options, but the easiest is to load the field into an object and go to the Number tab and select Timestamp.  You can also do this in the script editor by prefacing the field with Timestamp(<your date field here>), as shown below, and this will then show the field as a date whenever it's used in an object (aka globally).

LOAD Timestamp(Date)

FROM

[\\vmware-host\Shared Folders\Desktop\date.xlsx]

(ooxml, embedded labels, table is Sheet1);

Hope this helps!

-Austin

kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi,

     Try this.

     Timestamp( 41271.378252315)

Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!