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

Date Format is changed while loading from QVD

Hi guys,

I am loading a date field from a table to QVD and the format there is MM/DD/YYYY.

Then when I load it from the QVD to QVW the format is gone and all what I see is number such as:  40728 !

Anybody has a solution?

Thxs,

1 Solution

Accepted Solutions
Jason_Michaelides
Partner - Master II
Partner - Master II

I assume your load script looks something like this:

Data:

LOAD

     Field1,

     Field2,

     Field3,

     DateField,

..

..

FROM .....;

Change this to:

Data:

LOAD

     Field1,

     Field2,

     Field3,

     Date(DateField,'MM/DD/YYYY')     AS     DateField

..

..

FROM .....;

View solution in original post

5 Replies
Jason_Michaelides
Partner - Master II
Partner - Master II

Don't forget a date is really just an integer underneath any formatting.  Unless you tell QV to format it, it will just return the number.

Ensure you have these (or similar) settings at the top of your load script:

SET TimeFormat='hh:mm:ss';

SET DateFormat='MM/DD/YYYY';

SET TimestampFormat='MM/DD/YYYY hh:mm:ss[.fff]';

Or else format it explicitly while loading with

Date(DateField,'MM/DD/YYYY')     AS     DateField

Hope this helps,

Jason

Not applicable
Author

How can I do the second one.

I already have the format setting on top of my query

Jason_Michaelides
Partner - Master II
Partner - Master II

I assume your load script looks something like this:

Data:

LOAD

     Field1,

     Field2,

     Field3,

     DateField,

..

..

FROM .....;

Change this to:

Data:

LOAD

     Field1,

     Field2,

     Field3,

     Date(DateField,'MM/DD/YYYY')     AS     DateField

..

..

FROM .....;

Not applicable
Author

You are the best! quick answer..

Thank you so much

Jason_Michaelides
Partner - Master II
Partner - Master II

No problem.