It is currently 22 May 2018 7:31


Post new topic  Reply to topic  [ 2 posts ] 
Author Message
PostPosted: 16 Apr 2012 8:43 
Offline
Nouveau
Nouveau
User avatar

Joined: 26 Nov 2008 12:00
Posts: 188
Location: Bogotá
How can I obtain a MMDDYYYY var format using calcdate ?

for example, today is 20120416 and i use a CALCDATE to return the last day of the previous month as PARM1 %%$CALCDATE %%$DATE - %%$DAY, CTM returns 20120331, but i need this date in format MMDDYYYY. Any idea ?

Currently, i must take this date and convert in the script code from YYYYMMDD to MMDDYYYY, but i think it's very nice if this variable pass as needed.

Thanks. 8O


Top
   
PostPosted: 17 Apr 2012 5:03 
Offline
Nouveau
Nouveau
User avatar

Joined: 11 Oct 2007 12:00
Posts: 161
Location: Melbourne
You need to do the following
%%YYYY = %%SUBSTR %%YYYYMMDD_DATE 1 4
%%MM = %%SUBSTR %%YYYYMMDD_DATE 5 2
%%DD = %%SUBSTR %%YYYYMMDD_DATE 7 2
%%PARM1 = %%DD.%%MM.%%YYYY


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 2 posts ] 

All times are UTC+02:00


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Limited
The site created by Franck YOT. Images, logo, content and trademarks about Control-M products are property of BMC Software.
All the comments are property of their posters. Images, logo, content and design are © copyright by Scheduler-Usage.com. All Rights Reserved