Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Folks,
Can any one give the difference between
Time,
Time#
Timestamp
Timestamp#
with exapmles . i have seen help file and community examples and also
but still i have confusion.
can anyone give simple examples with explination ?
Thanks in advance
Hi,
Its simple.
Time function converts the number parameter into Time, It also allows you to define the format
Time# function converts the Text parameter into Time.
Similarly
Timestamp function converts the number parameter into Time, It also allows you to define the format
Timestamp# function converts the Text parameter into Time.
Regards,
Kaushik Solanki
page 3 of this doc
explains the difference between interpretation functions (#) and formatting functions (without #)
Hi,
Inthis case both Time and Timestamp will give same result then why do we have 2 functions ?
can u give me with one sample data if posssibel
Interpretation function, Date#() and Timestamp#() are string to number conversions. That is input is a string that contains a date and the function
creates a correct date serial number. The outpit is a dual field, i.e both sting and number.
Formatting functions Date() and Timestamp() are just opposite to the above explnations. they are number to string conversion. That is the input is date serial number and the function creates a string with properly formatted date
the output here is a dual field,i.e both string and number
Timestamp#('20110512 08:22','YYYYMMDD hh:mm') As Timestamp or
Timestamp#('05-12-2011 08.22:32','MM-DD-YYYY hh.mm.ss') As Timestamp
And Timestamp() means the default format you wish to be shown in your application
Timestamp('12-05-2011 08:22','DD.MM.YYYY hh:mm') As Timestamp
often you need to combine both functions
Timestamp(Timestamp#('20110512 08:22','YYYYMMDD hh:mm'),'DD.MM.YYYY hh:mm') As Timestamp
Regards.
Siva
this is from Qlik help
The timestamp# function evaluates the expression as a date and time according to the string given as format-code.
The time# function evaluates the expression as time according to the string given as format-code
Hi,
why not check out ' Date and Time Functions' in the QV help?
HTH
Andy
Hi,
You are true that both will give same result, but the input parameter which they take is different.
One converts Number into Time and Other converts Text into Time.
Regards,
Kaushik Solanki