cag8f Posted July 4, 2018 Posted July 4, 2018 Hi all. The `@MON` macro inserts the two-digit current month. But what is the best way to insert the one-or-two-digit month? In other words, if the current month is May, I'd like to insert `5` instead of `05. Would I just have to manually insert an `IF()` statement to check if a leading zero is present, and remove it if so? Just wondering if there are more established/automated/built-in methods of doing so. I'm also interested in doing the same for the day macro (`@MDAY`). Thanks in advance.
RTFC Posted July 4, 2018 Posted July 4, 2018 Int(@MON) should do it. My Contributions and Wrappers Spoiler BitMaskSudokuSolver BuildPartitionTable CodeCrypter CodeScanner DigitalDisplay Eigen4AutoIt FAT Suite HighMem MetaCodeFileLibrary OSgrid Pool RdRand SecondDesktop SimulatedAnnealing Xbase I/O
cag8f Posted July 4, 2018 Author Posted July 4, 2018 @RTFC Great, that worked, thanks. We can consider this resolved then.
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