Jason Russell
asked on
DateTime Formula
I am presently trying to create a datetime formula that will populate at the time when the report is printed. The format for this will be 2109201502:15PM . So basically DDMMYYYYHH:MMTT. I have been beating my head off a wall because if I get the date and time combined I can't get it to leave the space out after the minutes where its formating it as DDMMYYYYHH:MM TT. Anything I bring into the formula wants to add a space where I don't want the space.
ASKER CERTIFIED SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
Certain letters in the format string are case sensitive. Capital M's are for months and lowercase m's are for minutes. Capital H's mean 24 hour clock while lower case h's mean 12 hour clock. You will need a mlmcc's formula with some minor changes:
CStr(CurrentDateTime,"ddMMyyyyhh:mmtt")
DDMMYYYYhh:mmTT
or maybe use two functions and concatenate them
one with
DDMMYYYY
the other with
hh:mmTT
Regards