Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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.
hei you need to use capital like 'dd/MM/yy'
hei you need to use capital like 'dd/MM/yy'
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
Thanks guys.