It is currently 23 Sep 2017 1:20


Post new topic  Reply to topic  [ 3 posts ] 
Author Message
PostPosted: 15 Jan 2015 4:21 
Offline
Nouveau
Nouveau
User avatar

Joined: 07 Jan 2010 12:00
Posts: 6
Hi, I am trying to run a job which must ran for a date 3 months in the past and I can't find an easy way to do this...ideally it would be something like:

%%3MONTHSAGO = %%CALCDATE %%MONTH -3
but that would be too easy...

Using V.8

Many thanks


Top
   
PostPosted: 19 Jan 2015 9:18 
Offline
Nouveau
Nouveau
User avatar

Joined: 26 Apr 2005 12:00
Posts: 696
Location: PARIS
To do that use this :

%%NEWDATE = %%CALCDATE %%DATE -90
%%NEWDATE = %%CALCDATE %%ODATE -90

%%3MONTHSAGO = %%SUBSTR %%NEWDATE 3 2


Top
   
PostPosted: 30 Jan 2015 9:54 
Offline
Nouveau
Nouveau
User avatar

Joined: 14 Jan 2010 12:00
Posts: 58
CALCDATE is an internal function that adds or subtracts days. I do not think you can get an exact date 3 months ago using it. -90 days does get you close.


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

All times are UTC+02:00


Who is online

Users browsing this forum: No registered users and 5 guests


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:  
cron
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