Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

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
Creator
Creator

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...

Anonymous
Not applicable
Author

Add TT for AM/PM:

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

Anonymous
Not applicable
Author

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

Anonymous
Not applicable
Author

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).