Jump to content

Recommended Posts

Posted

So, today is the 8th, and @MDAY = "08". Shouldn't @MDAY -1 = "07"?

Instead,

msgbox(1,"",@MDAY -1)

returns "7".. Similarly, adding to @MDAY also removes the leading 0 for dates between 01-09.

Is this a bug? Or am I not adding/subtracting from @MDAY properly? Or is it just not meant for that kind of thing?

Posted

So, today is the 8th, and @MDAY = "08". Shouldn't @MDAY -1 = "07"?

Instead,

msgbox(1,"",@MDAY -1)

returns "7".. Similarly, adding to @MDAY also removes the leading 0 for dates between 01-09.

Is this a bug? Or am I not adding/subtracting from @MDAY properly? Or is it just not meant for that kind of thing?

Do this action in calculator. 08 - 1 = 7, 0 is omitted.

Posted

Most macro's are strings. In order to perform any calculation on them, they will

automatically be converted to the appropiate variable type by AutoIt.

At least, that's my understanding of & experience with them

Posted

Yeah, I guess that makes sense. There's no "Date" type, so it doesn't make sense for me to expect a 07.. I'm just tired, not thinking straight.. heh.

I fixed my problem by adding a check for days between 01-09 and just adding the "0" manually.

Thanks.

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...