Qlik Community

QlikView Documents

Documents for QlikView related information.

How to insert a current timestamp

Employee
Employee

How to insert a current timestamp

A quick and easy way to insert the current timestamp into a new or existing attribute is to do the following in the Transform operator:

Create an expression rule that contains:

    datetime.string(datetime.timestamp())

The datetime.timestamp() returns the current timestamp and datetime.string() returns the string representation of that value. If you don't already have an output attribute, you'll want to add a new output attribute by first clicking the Add button on the ribbon.

datetime.png

Note that the datetime.timestamp() function will may return a slightly different value from record to record as it gets invoked per record.  If you just want to capture the timestamp at time of dataflow execution, you could use this instead:

     datetime.string(dataflow.start)

Version history
Revision #:
1 of 1
Last update:
‎08-08-2012 05:58 PM
Updated by:
Employee