Date and Time Format

Local time
Today, 11:45
Joined
Dec 18, 2024
Messages
10
I have a Date text box that will display the date in the following format 12/18/2024 5:00:00 PM. Is there away to remove the 2 digit seconds numbers and add text within the string? For example, I would like it to be in the following format: 12/18/2024 at 5:00 PM.

Thanks,
 
You could try using the Format property of the textbox.

BTW. Welcome to AWF!
 
As a start, I tried MeetingStartDate = Format([MeetingStartDate], "mm/dd/yy") , but it still displays a 4 digit year. Any ideas?

That's probably because Format returns a String, which can't overcome the fact that your textbox is bound to a Date datatype. You have to think of underlying datatypes and what functions return.
 
As a start, I tried MeetingStartDate = Format([MeetingStartDate], "mm/dd/yy") , but it still displays a 4 digit year. Any ideas?
Here's what I mean...
1734625133793.png

1734625151940.png

1734625214301.png
 
I tried Format(Date, "mm/dd/yy") and I'm still getting a 12/19/2024. Should I enter the format in my query?

it's a lesson to think about datatypes and how they flow through the different layers of Access.

Yes, if you used Format() in your query, and created a form textbox bound to it, it would honor the Format() request because it's a string.
 
The suggestion was to set the Format PROPERTY of the control, NOT to use the Format() function.
 

Users who are viewing this thread

Back
Top Bottom