Day problem

Technical support and scripting issues

Moderators: Dorian (MJT support), JRL

Post Reply
Morten Nissen
Newbie
Posts: 9
Joined: Thu Aug 25, 2005 12:46 pm

Day problem

Post by Morten Nissen » Thu Aug 25, 2005 12:58 pm

Hi there.

I have a problem getting the right format on the date

I get the right format of the year ( 2005 ) and month ( 08 ) but the day is shown as 1 instead of 01.
I need to have the day in 2 digits like the month. This is only a problem every month from the 1:st to the 9:th, but thats still 9 days that it don't work.

The reason for using this way instead of just getting date is that i have to use the ysterday's date, so i use the date - 1 and then i get the right date.

Anyone that can help me with that?

Here is what is in my script:

GetDate>date
Day>the_day
Month>the_month
Year>the_year
Sub>The_day,1
send>%the_year%%the_month%%the_day%



Best Regards
Morten Nissen

User avatar
support
Automation Wizard
Posts: 1450
Joined: Sat Oct 19, 2002 4:38 pm
Location: London
Contact:

Post by support » Thu Aug 25, 2005 1:23 pm

This is because you have performed a calculation on the day and therefore reduced it to a standard integer value. But all you now need to do is:

If>The_dayThe_day=0%The_day%
Endif
MJT Net Support
[email protected]

Morten Nissen
Newbie
Posts: 9
Joined: Thu Aug 25, 2005 12:46 pm

Day problem

Post by Morten Nissen » Fri Aug 26, 2005 9:02 am

support wrote:This is because you have performed a calculation on the day and therefore reduced it to a standard integer value. But all you now need to do is:

If>The_dayThe_day=0%The_day%
Endif
Thanks, it works fine now.


Best Regards
Morten Nissen

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts