Runnig a script in datastage

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

mdtauseefhussain wrote: What if we want to bring the date format like this with file name

Sample 2006-07-14 22:25:30.txt
I would still suggest to get rid of the space in between. But if you really want a space then use this

Code: Select all

date +"%Y-%m-%d %H:%M:%S"
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
mdtauseefhussain
Participant
Posts: 38
Joined: Mon Feb 27, 2006 10:34 pm
Location: Chennai
Contact:

Post by mdtauseefhussain »

When i try this (date +"%Y-%m-%d %H:%M:%S") it is not working iam getting this error

" Output from command was: ***
mv: |11:01:39.txt not found
the jos is throwing warnings
Mohammed Tausif Hussain Sheikh
Cognizant technologies,Perungudi
Chennai
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

Told you. THe space is creating the problem.
replace the space from between by maybe a dot.
use this

Code: Select all

date +"%Y-%m-%d.%H:%M:%S" 
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
Post Reply