PiPio
PiPio

Reputation: 99

How can i get current date for sequential file in DataStage?

Hello i'm having a problem with Datastage sequential file to get the date (current date) for sequential file.

the path i've been using is

#WMS_PATH.WMS_PATH#namefile_#DSJobStartDate#.csv

but i wanted the format to be YYYYMMDD, is there any way to do it?

Upvotes: 0

Views: 1723

Answers (2)

William Pearsall
William Pearsall

Reputation: 214

Using the following function in a user variable stage then reference that user variable in the string path.

#uv stage code#
DateToString(DSJobStartDate, "%yyyy%mm%dd")

filepath
#WMS_PATH.WMS_PATH#namefile_#uvstage.datestring#.csv

Upvotes: 1

MichaelTiefenbacher
MichaelTiefenbacher

Reputation: 4005

These date functions are available

Date format options can be found here

Alternatively you could try DATE() and format that as needed.

Upvotes: 1

Related Questions