Link to home
Start Free TrialLog in
Avatar of Bob Collison
Bob CollisonFlag for Canada

asked on

Access 2010 Report - Display Current Date Time as CCYY-MM-DD@HH:MM

In an Access 2010 Report I have a Field to display the Date defined with the following properties:
Tab Other - Name: F45320DateTime
Tab Data - Control Source: =(Now())
Format Tab - Format: Short Date

This displays the Date correctly as: CCYY-MM-DD

I want to add the time to also display as: CCYY-MM-DD@HH:MM (24 Hour Time.

What is the code to do this?

Thanks,
Bob C.
ASKER CERTIFIED SOLUTION
Avatar of Jim Dettman (EE MVE)
Jim Dettman (EE MVE)
Flag of United States of America image

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
BTW, this shows you all the different ways you can use the format property:

https://support.office.com/en-us/article/format-property-date-time-data-type-3251a423-3dd7-446e-be65-c7293eddbb43?ui=en-US&rs=en-US&ad=US

 For date/times.

 Also, this:

 https://support.office.com/en-us/article/format-function-6f29d87b-8761-408d-81d3-63b9cd842530

 is a good overview of everything you can do with Format.

Jim.
Oops, typo.  Should be:

   YYYY-MM-DD@HH:NN

Jim.
Avatar of Bob Collison

ASKER

Hi Jim,

That's perfect!

I did change it to: YYYY-MM-DD@HH:MN so it only display Hours / Minutes.

Thanks,
Bob C.