Skip to main content
Announcements
July 15, NEW Customer Portal: Initial launch will improve how you submit Support Cases. IMPORTANT DETAILS
cancel
Showing results for 
Search instead for 
Did you mean: 
tanmayNobel
Contributor
Contributor

How to convert Numeric to date in data load editor

Hi I have data loaded as NUM. It contains date. I want to convert it to date format so that I can load it into the datepicker.

Here is my data:-

Screen Shot 2022-06-23 at 12.44.14 PM.png

I have tried these in the data load editor:-

Load

Date((Floor(Timestamp#([stamp], 'YYYY-MM-DD hh:mm:ss') ))) AS [amidate];

Date((Floor(Num#([stamp], 'YYYY-MM-DD hh:mm:ss') ))) AS [amidate];

 

I have set my date and time to this:

SET TimeFormat='h:mm:ss TT';
SET DateFormat='M/D/YYYY';

 

It still loads as Num. Can anyone suggest how to load it in Date?

 

Labels (1)
4 Replies
tamilarasu
Champion
Champion

Try this,

Date(Floor([stamp])) AS [amidate];

tanmayNobel
Contributor
Contributor
Author

Tried. It still loads as Numeric.

Screen Shot 2022-06-23 at 1.16.57 PM.pngData Load scriptData Load script

tanmayNobel
Contributor
Contributor
Author

The field stamp is loaded from the source in this format 2022-05-18 01:00:00. When I see it on qlik it is in this format:- Screen Shot 2022-06-23 at 1.50.25 PM.png

marcus_sommer

Your field isn't numeric else a string and the string-content is neither a date nor a time else a timestamp. This means you need to adjust the timestamp-variable to be able to interpret the content as timestamp which could be then transformed into a date like mentioned above with floor().

- Marcus