Computer Learning Zone CLZ Access Excel Word Windows

One of the great challenges in life is knowing enough to think you're right but not enough to know you're wrong

-Neil deGrasse Tyson
Home   Courses   Seminars   Templates   TechHelp   Forums   Help   Contact   Join   Order   Logon  
Home > Code Vault > Generic VBA > Date Time > Date Formats
Date Codes for Format Function
By Richard Rost   Richard Rost on LinkedIn Email Richard Rost   3 years ago

I always find myself having to look these up: Date Codes for the Format Function

d         day of month: 1 to 31
dd        day of month, two digits: 01 to 31
ddd       weekday, short: Mon, Tue, Wed, etc.
dddd      weekday, long: Monday, Tuesday, etc.
w         day of the week: 1 to 7
ww        week of the year: 1 to 53
m         month: 1 to 12
mm        month, two digits: 01 to 12
mmm       month, short: Jan, Feb, Mar, etc.
mmmm      month, long: January, February, etc.
q         quarter of year: 1 to 4
yy        year, two digits: 00 to 99
yyyy      year, four digits: e.g. 1950, 2000, 2014
h         hour: 0 to 23
hh        hour, two digits: 00 to 23
n         minute: 0 to 59
nn        minute, two digits: 00 to 59
s         second: 0 to 59
ss        second, two digits: 00 to 59

DateFormatted = Format(MyDate,"mmddyyyy")


Comments for Date Codes for Format Function
Age Subject From
15 monthsTime code for 100th of a secStacy Atchison


Start a NEW Conversation
Only students may post on this page. Click here for more information on how you can set up an account. If you are a student, please Log On first. Non-students may only post in the Visitor Forum.
Subscribe to Date Codes for Format Function
Get notifications when this page is updated

The following is a paid advertisement
Computer Learning Zone is not responsible for any content shown or offers made by these ads.

Access - index
Excel - index
Word - index
Windows - index
PowerPoint - index
Photoshop - index
Visual Basic - index
ASP - index
My Account
My Courses
Lost Password
Student Databases
Change Email
Latest News
New Releases
User Forums
Topic Glossary
Tips & Tricks
Search The Site
Code Vault
Collapse Menus
Customer Support
Web Site Tour
Consulting Services
Affiliate Program
Richard Rost
Free Lessons
Mailing List
Video Tutorials
Learning Connection
Idiot's Guide to Excel
Volume Discounts
Payment Info
Terms of Sale
Contact Info
Support Policy
Mailing Address
Phone Number
Fax Number
Course Survey
Email Richard
[email protected]
Blog RSS Feed    YouTube Channel

Copyright 2023 by Computer Learning Zone, Amicron, and Richard Rost. All Rights Reserved. Current Time: 10/4/2023 5:32:52 AM.
Keywords: code vault generic vba format date codes  PermaLink  Date Codes for Format Function