How can I display dates in a completely custom format (that might not be supported by FormatDateTime)? [Print this FAQ]
Answer:
In a previous FAQ, we looked at how to use the VBScript function FormatDateTime to nicely format a date variable. Unfortunately, the FormatDateTime function only allows for five different formats. To have complete control over the look and feel of how your date variables are displayed, you will need to create a custom date formatting function.
Fortunately, such a function has already been created (and is on 4Guys!). This function is provided and explained in this article. Be sure to try out the live demo as well!
With the code presented in the article above, you will be on your way to having complete control over the format of your date variables! Happy Programming!
FAQ posted by Scott Mitchell at
9/27/2000 5:10:41 PM to the
Dates and Times category.
This FAQ has been viewed 71,759 times.
Do you have a FAQ you'd like to suggest?
Suggestions? Comments? If so, send it in!
Also, if you'd like to be a FAQ Admin (creating/editing FAQs),
let me know! If you are looking for other FAQs, be
sure to check out the 4Guys
FAQ and Commonly Asked Messageboard Questions!