Jump to content

Recommended Posts

Posted

I have established how to get tomorrows date however I can't seem to figure out how to format the date into my required format of MM/DD/YYYY.  

I have this:

$today=_DateToDayValue(@YEAR,@MON,@MDAY)
Dim $Y, $M, $D
$tomorrow=_DayValueToDate($today+1, $Y, $M, $D)

The _DateToDayValue seems to have a fixed format.  I've also tried a :

$vardate = _DateAdd( 'd',1, _NowCalcDate())

with a "StringSplit" and/or StringFormat but the _NowCalcDate seems to also be fixed to a YYYY/MM/DD format.

I'm sure I'm missing something simple but am at a loss.

Any help would be MUCH appreciated

 

 

Posted

Hello. Try this.

 

#include <Date.au3>
Local $today=_DateToDayValue(@YEAR,@MON,@MDAY),$Y, $M, $D
Local $tomorrow=_DayValueToDate($today+1, $Y, $M, $D)
$tomorrow= StringFormat("%02i/%02i/%04i", $M,  $D,  $Y)
ConsoleWrite($tomorrow & @CRLF)

Saludos

  • 11 months later...
Posted

I had a similar predicament and it has been solved as well. Thank you.

But:

why does it work??! You're putting arguments outside of the function call! to say the least.

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
×
×
  • Create New...