Jump to content

Recommended Posts

Posted

I've spent ages trying to figure out who to add 7 days to the current date and put it into DDMMYY format.

I can do both indivdually MsgBox ( 0, "DDMMYY", @MDAY & @MON & StringRight (@Year, 2 ) ) and $sNewDate = _DateAdd( 'd',5, _NowCalcDate()) but can't do both.

Any help would be appreciate - oh I also need to SEND it so please advise how I send the variable once it's calculated and formatted.

Send("090708")

Thanks

  • Developers
Posted

Something like this:

#include<date.au3>
$sNewDate = _DateAdd('d', 5, _NowCalcDate())
$aNewDate = StringSplit($sNewDate,"/")
$Date = $aNewDate[3] & $aNewDate[2] & $aNewDate[1]

Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Posted (edited)

#include <Date.au3>
$sNewDate = _DateAdd( 'd',7, _NowCalcDate())
;Convert YYYY/MM/DD to DDMMYYYY
$new = StringRegExpReplace($sNewDate, "\A(\d{4})/(\d{2})/(\d{2})","$3$2$1")
MsgBox(0,"",$new)oÝ÷ Ù«­¢+Ø¥¹±Õ±ÐíѹÔÌÐì(ÀÌØíÍ9ÝÑô}Ñ ÌäíÌäì°Ü°}9½Ý
±Ñ ¤¤(í
½¹ÙÉÐeeed½54½Ñ¼55ed(ÀÌØí¹ÜôMÑÉ¥¹IáÁIÁ± ÀÌØíÍ9ÝѰÅÕ½ÐìÀäÈí¸¸ ÀäÈíìÉô¤¼ ÀäÈíìÉô¤¼ ÀäÈíìÉô¤ÅÕ½Ðì°ÅÕ½ÐìÀÌØìÌÀÌØìÈÀÌØìÄÅÕ½Ðì¤)5Í   ½à À°ÅÕ½ÐìÅÕ½Ðì°ÀÌØí¹Ü¤

Edited by weaponx
  • 2 weeks later...

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...