CurrentTimestamp(),CurrentDate() and CurrentTime() Functions in DataStage


CurrentTimestamp(),CurrentDate() and CurrentTime() functions are most useful functions in DataStage when we are dealing with the jobs to get the ‘current’ date and time stamp.

Generally we use these functions while we are loading data into different applications why because these different applications expect date into the database tables as an audit column.

I think almost all the projects follow these type of audit columns and based on this column we can identify the original record load time into the table.

You may have the audit column name as RecordLoadDate Or JobRundate and we capture record loaded details with CurrentTimestamp(),CurrentDate() and CurrentTime() functions and these are inbuilt functions to DataStage.

You can access these functions through Transformer Stage derivation or from sequence job derivations.

One more important thing is these functions returns the default datatype such as  CurrentDate() will give output in YYYY-MM-DD format. As we know YYYY-MM-DD is the default date format in DataStage.


This functions returns a time stamp giving the date and time that the job runs in time stamp format.
Input: Not applicable

Output: timestamp


Returns the time at which the job runs in time format.
Input: Not applicable

Output: time


Returns the date that the job runs in date format.
Input: Not applicable
Output: date
Use this function to add a new column containing the date to the data output by the Transformer stage.



Leave a Reply