Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
oanalung
Contributor III
Contributor III

Date Fields

Hi,I am loading some date fields, using date(MyDateField) when I am doing the load, however if I convert the date to num - num(MyDateField) I can two different formats and values look odd. 

From the image below first column is the  MyDateField and second is num(MyDateField), but if you look at the second column, from second row date number looks odd

Any idea why?

Labels (3)
1 Solution

Accepted Solutions
Anonymous
Not applicable

Dates are numeric. The second column has values to the right of the decimal indicating it has a timestamp associated to it. If you don't want that and just the date use Floor;

Date(Floor(YourDateField),'DD/MM/YYYY')

HTH,

John

View solution in original post

5 Replies
durgesh22
Creator
Creator

@oanalung 

if you want same format in 2nd field you can use below exp.

Date(num(datefield),'DD/MM/YYYY')

refer below for for information

help.qlik.com/en-US/sense/February2022/Subsystems/Hub/Content/Sense_Hub/Scripting/FormattingFunctions/Date.htm

oanalung
Contributor III
Contributor III
Author

I don't need the same format, but if you look at the second column, from second row date number looks odd

Anonymous
Not applicable

Dates are numeric. The second column has values to the right of the decimal indicating it has a timestamp associated to it. If you don't want that and just the date use Floor;

Date(Floor(YourDateField),'DD/MM/YYYY')

HTH,

John

MarcoWedel

To purge the fractional time part of your timestamps and at the same time format as date, you can use the DayName() function as well:

https://help.qlik.com/en-US/qlikview/May2021/Subsystems/Client/Content/QV_QlikView/Scripting/DateAnd...

 

MarcoWedel_0-1651779046395.png

 

Anonymous
Not applicable

Nice. I've never used those functions (Day*) but just might start updating some reports with this. Thanks Marco!