Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

timestamp variable

Status
Not open for further replies.

tiedyelime

Programmer
May 8, 2006
6
0
0
US
Can you put an variable for current datetime stamp in XML?
I would like to put the system datetime stamp in the below code under version label.

Thanks for your help.

<FMCmd>
<ParentId>860aa610677211daa185a5634fbc8490</ParentId>
<NewsItem>
<File>D:\CognosReports\1611\*1611*.pdf</File>
<VersionLabel>current datetime stamp</VersionLabel>
</NewsItem>
</FMCmd>
 
Yes. What language are you creating the file in?

I'd simply output a string in the form yyyymmddhhmmss.
 
the input file is xml. then i'm using a batch file to run the code. this is a cognos command.

D:\Cognos\cer5\Bin\FMCmd -u Administrator -p admin1234 -f 1611.xml -o 1611_NewVer.xml -c NewUpload -v timestamp
D:\Cognos\cer5\Bin\FMCmd -u Administrator -p admin1234 -f MA.xml -o MA_NewVer.xml -c NewUpload -v timestamp
Pause

my problem is everything i put there is returned as a string. for example if i put timestamp() or system.date.now, etc, it returns exactly what i type.

do you know how i can change it from string to be the current date?

thanks for your help.
 
Actually, you need to put the shell variable for the date/time in your batch file. Lemme look this up...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top