Trouble Viewing Images? Right-click on any image and select "Open in new tab" to view a larger version. You can also zoom in using Ctrl + Mouse Wheel for easier readability.
Article Goal
This article provides a reference for using standard and custom date/time format strings in VDM when formatting fields within a report or data view.
What Is Date/Time Format Strings?
Date and time format strings allow you to control how values are displayed in VDM. These formatting options help ensure that date and time outputs are clear, readable, and aligned with your organizational or regional preferences.
Why Use Format Strings?
Using date and time format strings helps you:
- Present dates in a clear and professional format
- Match regional formatting standards
- Customize display for reports or dashboards
- Maintain consistent output across fields and views
Format strings make it easy to display timestamps and calendar data exactly how your users need to see them.
Standard Date/Time Format Strings
Standard format strings are single-character codes that represent common date and time patterns. They are quick to apply and produce familiar, consistent formats.
| Format | Description | Sample Output (2/22/2025 at 12:00 AM) |
|---|---|---|
d | Short date | 2/22/2025 |
D | Long date | Saturday, February 22, 2025 |
t | Short time | 12:00 AM |
T | Long time | 12:00:00 AM |
f | Full date/time (short time) | Saturday, February 22, 2025 12:00 AM |
F | Full date/time (long time) | Saturday, February 22, 2025 12:00:00 AM |
g | General date/time (short time) | 2/22/2025 12:00 AM |
G | General date/time (long time) | 2/22/2025 12:00:00 AM |
Custom Date/Time Format Strings
Custom format strings allow you to build flexible date and time output patterns by combining multiple format components to meet specific display needs.
Common Date Format Specifiers
| Format | Description | Sample Output |
|---|---|---|
yy | Last two digits of the year | 25 |
yyyy | Four-digit year | 2025 |
MM | Month as two digits | 02 |
MMM | Month name (short) | Feb |
MMMM | Month name (full) | February |
dd | Day of the month | 22 |
ddd | Day of the week (short name) | Sat |
dddd | Day of the week (full name) | Saturday |
/ | Date separator (depends on regional settings) | / |
Common Time Format Specifiers
| Format | Description |
|---|---|
hh | Hours |
mm | Minutes |
ss | Seconds |
tt | AM/PM indicator |
: | Time separator (depends on regional settings) |
MM/dd/yyyy hh:mm tt for more advanced formatting such as 02/22/2025 12:00 AM.Article Summary
This article provides an overview of both standard and custom date/time format strings available in VDM. Standard format strings are predefined, single-character codes used for commonly accepted formats, while custom format strings offer precise control over individual date and time components, such as year, month, day, hour, and minute. These options allow users to present data consistently and align output with reporting or localization requirements.
Comments
0 comments
Article is closed for comments.