Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Dear All,
I have read so many document about date() and timestamp()
but did not get it why we required this 2 function independently.
The reason behind asking this question is we can perfom date and time formating with date() as well as timestamp() also.
So why 2 different function available???
Which one is most preferable??
Please share knowledge
Regards
You're right that both are doing the same thing. The following two calls return the same values:
Date(Time,'YYYY-MM-DD hh:mm'),
Timestamp(Time,'YYYY-MM-DD hh:mm'),
The only difference is in the defaults. The reason why it is the way it is, is mostly historical.
HIC
True, they do not differ a lot, except that both functions default to different format strings if you omit the second parameter.
Sorry, forgot about the second part of your question. I do not have a preference except that typing date takes less time (! there you have the third sister-function) than typing timestamp
Best,
Peter
Hi,
Full understanding of Date is important for QV developers. I will advice to read the following blogs from HIC
Like it
Hi,
thanks for reply.
I have already read this article but did not get the reason why 2 independent function availble in qlikview even if both perform same thing????????
Thanks again.
Regards
when using the date function on a timestamp you may not always get the desired output in calculations , use the timestamp when the date has a time with it eg 01/09/2015 17:23:12 and date for just dates without time
Hi,
I dont think so the formatting is happening beacuse of date() and timestamp()
It is happening because you setting format in in load script
check your
dateFormat
and TimestampFormat in script.
Regards,
You're right that both are doing the same thing. The following two calls return the same values:
Date(Time,'YYYY-MM-DD hh:mm'),
Timestamp(Time,'YYYY-MM-DD hh:mm'),
The only difference is in the defaults. The reason why it is the way it is, is mostly historical.
HIC