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