Jump to content
Sign in to follow this  
Roman

Find out the day of month of yersterday?

Recommended Posts

Hi

How can i find out the day of month of yersterday? @DAY-1 doesn't work because i could get a zero if today is the first of month. :D

Greetings, Roman.

Share this post


Link to post
Share on other sites

Well...

If @MDAY - 1 = 0 Then

$Mon = @MON -1

Else

$Mon = @MON

EndIf

Is that what you wanted?

Not exactly. That gives me back the last or the current month. I need a date macro like "@MYESTERDAY".

For example: Today could be the date 2006 07 01. The date macro @MDAY gives me back a "01", ok?

Now, i need something that gives me back a "30" because yesterday was the date 2006 06 30.

???

Thanks!

Share this post


Link to post
Share on other sites

or;

#include <Date.au3>

local $MyDate,$MyTime

_DateTimeSplit(_DateAdd( 'd',-1, _NowCalcDate()),$MyDate,$MyTime)

MsgBox(0,"","Yesterday's date of Month= "&$MyDate[3])

Randall

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...