In this video, I'll show you how to format a list of date/time values so that they will show a time if needed, or just show the date value if the time portion is midnight.
Corinne from Henderson, Nevada (a Platinum Member) asks: I built a database where I have a form that shows upcoming appointments and tasks. Some of the appointments have times, which I want to see. However most of items are just tasks that can be done any time that day. If I format the field to show times, they all show up as being at midnight, which doesn't look good. Is there any way to hide the time portion of the date if it's at midnight? Plus, I want to see just hour and minute, not seconds. General Date works, but it shows seconds, and capital AM/PM. I'd like lowercase, if possible.
Silver Members and up get access to an Extended Cut of this video. Members will see how to format a single form date/time field to show the date only unless a time is specified. We'll use a little VBA, the OnCurrent and AfterUpdate events.
Gold Members and up will get a special Double-Extended Cut video. You will see how to format the date/time fields in a continuous form!
SILVER MEMBERS VIDEO:
https://youtu.be/p557KUsEgzI
GOLD MEMBERS VIDEO:
https://youtu.be/7HozTkQDcmY
BECOME A MEMBER:
YouTube: https://youtube.com/channel/UCl7-jJie4ifOVK87FINIuDg/join
or My Site: https://599cd.com/THMember
LEARN MORE:
https://599cd.com/DateOnly
LINKS:
Calculated Fields: https://599cd.com/Calculated
IIF Function: https://599cd.com/IIF
Field Properties: https://599cd.com/ACB3
Custom Date Formats: https://599cd.com/ACX3
Intro to VBA: https://599cd.com/IntroVBA
AfterUpdate Event: https://599cd.com/AfterUpdate
OnCurrent Event: https://599cd.com/OnCurrent
COURSES:
FREE Access Beginner Level 1: https://599cd.com/Free1
$1 Access Level 2: https://599cd.com/1Dollar
FREE TEMPLATE DOWNLOADS:
TechHelp Free Templates: https://599cd.com/THFree
Blank Template: https://599cd.com/Blank
Contact Management: https://599cd.com/Contacts
Order Entry & Invoicing: https://599cd.com/Invoicing
More Access Templates: https://599cd.com/AccessTemplates
ADDITIONAL RESOURCES:
Donate to my Tip Jar: https://599cd.com/TipJar
Get on my Mailing List: https://599cd.com/YTML
Contact Me: https://599cd.com/Contact
TechHelp: https://599cd.com/TechHelp
Consulting Help: https://599cd.com/DevNet
Twitter: https://twitter.com/LearningAccess
https://en.wikipedia.org/wiki/Microsoft_Access
https://products.office.com/en-us/access
https://microsoft.com/en-us/microsoft-365/blog/access/
KEYWORDS:
microsoft access, ms access, ms access tutorial, #msaccess, #microsoftaccess, #help, #howto, #tutorial, #learn, #lesson, #training, #database, format a date and time field, date/time format, DateOnly function, date without time,
QUESTIONS:
Please feel free to post your questions or comments below. Thanks.
0 Comments