myspacee Posted March 29, 2011 Share Posted March 29, 2011 hello, for job reason i need to have tommorow date in this format : ggmmaaaa (eg: 29032011) Can't obtain this, without using complicated functions about date, check end of month, etc. So i realize to obtain @mday, add 1, and 'convert' in date format, but i don't know how. Anyone can suggest me how ? thank you, m. Link to comment Share on other sites More sharing options...
MrMitchell Posted March 29, 2011 Share Posted March 29, 2011 (edited) One way... #include <Date.au3> $sNewDate = _DateAdd( 'd',1, _NowCalcDate()) ConsoleWrite($sNewDate & @CRLF) $aNewDate = StringSplit($sNewDate, "/", 2) $sNewDateggmmaaaa = $aNewDate[2] & $aNewDate[1] & $aNewDate[0] ConsoleWrite($sNewDateggmmaaaa & @CRLF) Edited March 29, 2011 by MrMitchell pete_wilde 1 Link to comment Share on other sites More sharing options...
sahsanu Posted March 29, 2011 Share Posted March 29, 2011 for job reason i need to have tommorow date in this format : ggmmaaaa (eg: 29032011) Another way... #include <date.au3> $today=_DateToDayValue(@YEAR,@MON,@MDAY) Dim $Y, $M, $D $tomorrow=_DayValueToDate($today+1, $Y, $M, $D) Consolewrite("Tomorrow will be: " & $D & $M & $Y & @CRLF) Link to comment Share on other sites More sharing options...
myspacee Posted March 29, 2011 Author Share Posted March 29, 2011 thank you MrMitchell, try now. sahsanu, try your code and end of month thank you both for reply, m. Link to comment Share on other sites More sharing options...
inm101 Posted April 21, 2011 Share Posted April 21, 2011 Another way... #include <date.au3> $today=_DateToDayValue(@YEAR,@MON,@MDAY) Dim $Y, $M, $D $tomorrow=_DayValueToDate($today+1, $Y, $M, $D) Consolewrite("Tomorrow will be: " & $D & $M & $Y & @CRLF) Thank you for posting this. This is just what I needed! Link to comment Share on other sites More sharing options...
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