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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Cannot display date in dd/mm/yy format.

Hello all.

I have a date field (called EnterDatetime) which currently shows dates in the following format: dd/mm/yyyy

To save space, I need to display the field as dd/mm/yy. Here is the code I have used: =date(EnterDatetime,'dd/mm/yy')

Something is going wrong with the month as it comes back as 00. For example 23/00/12 for today.

Other date functions work on the field, for example:

=month(EnterDatetime) returns Jan.

=date(EnterDatetime) returns 23/01/2012.

Any suggestions?

Thanks in advance, Michael.

1 Solution

Accepted Solutions
lironbaram
Partner - Master III
Partner - Master III

hei you need to use capital like 'dd/MM/yy'

View solution in original post

3 Replies
lironbaram
Partner - Master III
Partner - Master III

hei you need to use capital like 'dd/MM/yy'

stephencredmond
Partner - Specialist II
Partner - Specialist II

Liron is correct.

As a rule of thumb, use capitals for dates and small letters for time:

DD/MM/YYYY hh:mm:ss

Note that "mm" means minutes while "MM" is months - which is why you are getting "00" for your month.

If you are ever in need of a reminder, look at the number format tab of any QlikView object that has one and see the "Time Stamp" format.

Regards,

Stephen

Not applicable
Author

Thanks guys.