Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations John Tel on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Format date/time without seconds 1

Status
Not open for further replies.

belovedcej

Programmer
Nov 16, 2005
358
US
I have a form which a control with a default value of
now() so we have the date and the time.


The format automatically is date hh:mm:ss Meridian

The users sometimes change the date and time in this field, and they don't like the seconds.

Is there anyway to get rid of them easily? BTW - this is an unbound form/control.
 
How about:

[tt]Format(Now(), "dd/mm/yyyy hh:nn")[/tt]
 
Thanks for the suggestion.

It worked to format it, but when editing it, the format changes back to the original. I think I must need an input mask instead of a format. I'll try to adapt your suggestion in that way.
 
Got it - thanks Remou. I used your expression for the default value, also changed the format to dd/mm/yyyy hh:nn and then created and input mask of date/time type that looked the way I wanted.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top