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
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
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