covaks Posted February 8, 2008 Posted February 8, 2008 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?
rasim Posted February 8, 2008 Posted February 8, 2008 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.
whim Posted February 8, 2008 Posted February 8, 2008 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
covaks Posted February 8, 2008 Author Posted February 8, 2008 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.
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