Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
reporting_neu
Creator II
Creator II

How to create a timestamp in script? (snapshot)

Hello together,

I have a very simple question but I can't figure it out.

At the end of the script I want to create a timestamp (DD.MM.YYYY / MM: HH). It should document the timestamp after the dataset was updated , to display it in the report for the users. The timestamp must be a snapshot and not a date from my datasets.

I've tried:

DB_Control:
LOAD *,
date(Today()) AS TS;

 

Or:

DB_Control:
LOAD *,
timestamp(now()) AS TS;

 

Can you help me, please? 😁

Labels (1)
1 Solution

Accepted Solutions
marcus_sommer

To include such a timestamp within a data-table is IMO not preferable else assigning it to a variable would be more suitable. But even better is probably just to use reloadtime() within a textbox or any title or similar within the UI.

- Marcus 

View solution in original post

4 Replies
arulsettu
Master III
Master III

Maybe like this

DB_Control:
LOAD *,

timestamp(now(),'DD.MM.YYYY / MM:HH') as TS;

reporting_neu
Creator II
Creator II
Author

This looks very good. Thanks a lot for this.

However, when I load the script, the "DB_Control" table is not available to me afterwards to select the value TS.

 

marcus_sommer

To include such a timestamp within a data-table is IMO not preferable else assigning it to a variable would be more suitable. But even better is probably just to use reloadtime() within a textbox or any title or similar within the UI.

- Marcus 

reporting_neu
Creator II
Creator II
Author

Hallo Marcus,

vielen Dank für deine Antwort. Das ist genau das was ich gesucht habe. Ich wusste nur nicht, dass es diese Funktion gibt. Funktioniert super!

 

### English ######################################

 

Hello Marcus,

many thanks for your response. That's exactly what I was looking for. I just didn't know this feature existed. Works perfectly!