Roman Posted June 20, 2006 Posted June 20, 2006 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. Greetings, Roman.
jvanegmond Posted June 20, 2006 Posted June 20, 2006 Well... If @MDAY - 1 = 0 Then $Mon = @MON -1 Else $Mon = @MON EndIf Is that what you wanted? github.com/jvanegmond
Roman Posted June 20, 2006 Author Posted June 20, 2006 Well...If @MDAY - 1 = 0 Then $Mon = @MON -1Else $Mon = @MONEndIfIs 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!
jvanegmond Posted June 20, 2006 Posted June 20, 2006 (edited) Get beta and look up _DateAdd Edit: #include <Date.au3> $sNewDate = _DateAdd( 'D',-1, _NowCalcDate()) MsgBox( 4096, "", "Yesterday's Date: " & $sNewDate ) Exit Edited June 20, 2006 by Manadar github.com/jvanegmond
randallc Posted June 20, 2006 Posted June 20, 2006 or; #include <Date.au3> local $MyDate,$MyTime _DateTimeSplit(_DateAdd( 'd',-1, _NowCalcDate()),$MyDate,$MyTime) MsgBox(0,"","Yesterday's date of Month= "&$MyDate[3])Randall ExcelCOM... AccessCom.. Word2... FileListToArrayNew...SearchMiner... Regexps...SQL...Explorer...Array2D.. _GUIListView...array problem...APITailRW
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now