Qlik Community

QlikView Connectors

Announcements
QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.
surender7
New Contributor

Set specific timestamp as variable

Can you please help me out, how to set timestamp as variable, the format that I need is 5/13/2014 5:00:00 PM.

Thanks

Surender

4 Replies
martinpedersen
Contributor

Re: Set specific timestamp as variable

Hi Surender,

Try adding this in your load script:

Let TimeStamp1 = Timestamp(Now(), 'M/D/YYYY h:mm:ss');

Set TimeStamp2 = Timestamp(Now(), 'M/D/YYYY h:mm:ss');

Reload and explore the variables...

mov
Esteemed Contributor III

Re: Set specific timestamp as variable

Add TT for AM/PM:

'M/D/YYYY h:mm:ss TT'

surender7
New Contributor

Re: Set specific timestamp as variable

I mean, I want to put a condition in my expression, where I want records greater than 5/13/2004 5;00:00 PM

I am trying to set this timestamp in variable and use that variable in expression, pl advise.

Thanks,

Surender

mov
Esteemed Contributor III

Re: Set specific timestamp as variable

For this specific timestamp, the variable definition is:

=timestamp(timestamp#('5/13/2004 5:00:00 PM', 'M/D/YYYY h:mm:ss TT'))

If you use it for the comparison, format doesn't matter (unless it is in set analysis where format does matter).

Community Browser