Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

dayna_litherlan
Contributor

How to create a timestamp

Hi All,

Completely stupid question, which is likely why I can't see an obvious answer on here, but how do you make a timestamp field?

I have a date, and a time, and I'd like it to be formatted like 'DD/MM/YYYY hh:mm:ss'

I've tried timestamp(Date&' '&Time,'DD/MM/YYYY hh:mm:ss') with no success. I know this is really simple, so sorry for the stupid question!

Kind Regards,

Dayna

1 Solution

Accepted Solutions

Re: How to create a timestamp

Try like this

TimeStamp(Time + Date, 'DD/MM/YYYY hh:mm:ss')

7 Replies

Re: How to create a timestamp

Try like this

TimeStamp(Time + Date, 'DD/MM/YYYY hh:mm:ss')

YoussefBelloum
Esteemed Contributor

Re: How to create a timestamp

Hi,

you should use Timestamp# before Timestamp to interpret your fields like a Timestamp, like this:

Timestamp(Timestamp#(your_date_field&your_hour_field, 'DD/MM/YY hh:mm:ss'))

dayna_litherlan
Contributor

Re: How to create a timestamp

Perfect! Thanks All!

YoussefBelloum
Esteemed Contributor

Re: How to create a timestamp

Hi stalwar1‌,

don't we need to use the Timestamp#() function when we want to evaluate non Timestamp field(s) as a Timestamp ?

Or it is just another trick you used here ?

Re: How to create a timestamp

Since both Date and Time have an underlying numeric value, all you need to combine them is to add them together using a plus sign

YoussefBelloum
Esteemed Contributor

Re: How to create a timestamp

Ok, thanks

ritaaguiar
Contributor

Re: How to create a timestamp

Following this question, this may seem even more stupid but

where do you write TimeStamp(Time + Date, 'DD/MM/YYYY hh:mm:ss') ?

Is it on the data load manager?