Link to home
Create AccountLog in
Avatar of Jason Russell
Jason RussellFlag for United States of America

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.
Avatar of Rgonzo1971
Rgonzo1971

maybe

DDMMYYYYhh:mmTT

or maybe use two functions and concatenate them
one with
DDMMYYYY
the other with
hh:mmTT

Regards
ASKER CERTIFIED SOLUTION
Avatar of Mike McCracken
Mike McCracken

Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
See answer
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")

Open in new window