Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello!
I've got a datefield formatted like 2009/09/01:12:00:29 AM (YYYY/MM/DD:HH:MM:SS TT). I want this to be dateformatted like 01-09-2009 12:00:29.
Can you help me?
Regards, Sander
Hi Sander,
if it is a text field than write:
TimeStamp(TimeStamp#(Date, 'YYYY/MM/DD hh:mm:ss tt'), 'DD-MM-YYYY hh:mm:ss)
TimeStamp# is for interpretation and TimeStamp to format your data.
If it doesn´t work please provide some data as example.
Good luck!
Rainer
Sander,
your code are:
TimeStamp(Date, 'DD-MM-YYYY hh:mm:ss') as NewTimeFormat
Please see also QV help and time functions like Timestamp, Day, Year and so on ...
Good luck!
Rainer
=TimeStamp(date,'DD-MM-YYY HH:MM:SS') ?
--Arun
Hi Guys,
I have tried the TIMESTAMP function. But because the dateformat of the original field isn't interpreted as a datefield this function can't reformat it to the desired format. The original field is YYYY/MM/DD:HH:MM:SS TT, how do I tell QlikView this is a datefield? I am loading from a flat .csv file so I think QlikView interpretes this as a text string or something..
Hope to hear from you..
Regards, Sander
Hi Sander,
if it is a text field than write:
TimeStamp(TimeStamp#(Date, 'YYYY/MM/DD hh:mm:ss tt'), 'DD-MM-YYYY hh:mm:ss)
TimeStamp# is for interpretation and TimeStamp to format your data.
If it doesn´t work please provide some data as example.
Good luck!
Rainer
Try
date(date#(datefield,'YYYY/MM/DD:hh:mm:ss tt'),'DD-MM-YYYY hh:mm:ss')
Rgds,
Joachim
Hi Guys,
Both Rainers as Joachim's expressions did the trick. The Timestamp# or Date# functions did the trick, I didn't knew the exact function of adding the #.. That's clear now. I have marked Rainers expression as the solution because the TIMESTAMP function seems to perform better than the DATE function.
Thanks for your time!
Regards, Sander