skyhawk 0 Posted August 24, 2010 (edited) Hi Everyone! I need some help formating the returned value of _NowCalcDate. I need the result to be in the following format of MMDDYY instead of MM/DD/YYYY which it currently is returned as. #include <Date.au3> ; Add 5 days to today $sNewDate = _DateAdd( 'd',5, _NowCalcDate()) MsgBox( 4096, "", "Today + 5 days: " & $sNewDate ) How would I go about doing that? Thanks everyone for your help Edited August 24, 2010 by skyhawk Share this post Link to post Share on other sites
bogQ 91 Posted August 24, 2010 (edited) MsgBox( 4096, "", "Today + 5 days: " & StringReplace($sNewDate,"/","") ) and use StringLeft to get the rest Edited August 24, 2010 by bogQ TCP server and client - Learning about TCP servers and clients connectionAu3 oIrrlicht - Irrlicht projectAu3impact - Another 3D DLL game engine for autoit. (3impact 3Drad related)There are those that believe that the perfect heist lies in the preparation.Some say that it’s all in the timing, seizing the right opportunity. Others even say it’s the ability to leave no trace behind, be a ghost. Share this post Link to post Share on other sites
somdcomputerguy 103 Posted August 24, 2010 This'll do it.. StringTrimLeft(StringReplace($sNewDate,"/",""), 2) - Bruce /*somdcomputerguy */ If you change the way you look at things, the things you look at change. Share this post Link to post Share on other sites
Spiff59 54 Posted August 25, 2010 (edited) You probably ought to just do it the old-fashioned way: $sNewDate = StringLeft($sNewDate, 2) & StringMid($sNewDate, 4, 2) & StringRight($sNewDate, 2) Edit: Realize though, you are risking the wrath of the Y2K gods. Edited August 25, 2010 by Spiff59 Share this post Link to post Share on other sites
skyhawk 0 Posted August 25, 2010 Ah very cool. Thanks everyone for all the great ideas. I'll give them a go tomorrow Share this post Link to post Share on other sites