Custom Date & Timestamp Formatting in Analyzer View of Cards
Hello Domo users! As a relative newcomer to this fantastic platform, I am thrilled to share my first discussion post with the greater Domo Community. I've been working with Domo for nearly a year at this point, and it has been a wonderful experience and I truly admire the insightful analytics and operational abilities this platform is able to provide to its users.
Over the past few months, I have learned how important it is to properly present and format dates and timestamps to provide insightful analysis and present accurate and impactful representations of data. Whether it is a minor use case or a monumental project, this is a reality that everyone will experience in any situation when presenting data. Today, I would love to demonstrate to the Domo community how exactly we can utilize the custom date & timestamp formatting abilities that can be accomplished in Domo.
I learned that the patterns used for custom date formatting in this view are based off the DateTimeFormatter class in Java. While there is documentation available for the DateTImeFormatter class in Java, I would like to provide specific examples that anyone can use in their own use cases in Domo. To illustrate this, I've experiemented with various examples based on the following timestamp: Tuesday, March 14, 2023 03:09:26 PM
Examples:
- Full date with day of the week, month, day, year, timestamp in 12 hour AM/PM format, and AM/PM distinction: EEEE, MMMM dd, yyyy hh:mm:ss a (Ex: Tuesday, March 14, 2023 03:09:26 PM)
- Full date with day of the week, month, day, and year: EEEE, MMMM dd, yyyy (Ex: Tuesday, March 14, 2023)
- Date and time in the format "yyyy-MM-dd HH:mm:ss": yyyy-MM-dd HH:mm:ss (Ex: 2023-03-14 15:09:26)
- Short date format "MM/dd/yyyy": MM/dd/yyyy (Ex: 03/14/2023)
- Year and month: yyyy-MM (Ex: 2023-03)
- Abbreviated day of the week and short month name: E, MMM dd (Ex: Tue, Mar 14)
- Custom pattern for day of the week, day, month, and year: E, d MMM yyyy (Ex: Tue, 14 Mar 2023)
KEY:
Date Shorthand:
- L (equivalent to "Date Shorthand" date format) (Ex: 03/14/2023)
Quarter:
- Q: Fiscal quarter in numeric format (Ex: 1)
Week:
- W or w: Week in numerical format (Ex: 11)
Day of Week:
- e: Localized day of week (Ex: 2)
- E: Short-hand day of week (Ex: Tue)
- EEEE: Full day of week (Ex: Tuesday)
Day:
- d: Day in one or two digits (Ex: 14, or 5 if the date was March 5th)
- D or dd: Day in two digits (Ex: 14, or 05 if the date was March 5th)
Month:
- M: Month in one digit (Ex: 3)
- MM: Month in two digits (Ex: 03)
Year:
- y: Year in two digits (Ex: 23)
- Y or yyyy: Year in four digits (Ex: 2023)
Hour:
- HH: Hour in 24 hour AM/PM format in two digits (Ex: 15, since 3 hours after 12pm is 3pm)
- k: Hour in 24 hour AM/PM format (Ex: 15)
- hh: Hour in 12 hour AM/PM format in two digits (Ex: 03)
- h: Hour in 12 hour AM/PM format in one digit (Ex: 3)
Minute:
- m: Minute in one or two digits (Ex: 9)
- mm: Minute in two digits (Ex: 09)
Second:
- s: Second of a minute in one or two digits (Ex: 26, or 9 if the timestamp was 03:09:09 PM)
- ss: Second of a minute in two digits (Ex: 26, or 09 if the timestamp was 03:09:09 PM)
- S: Fraction of a second (Ex: 246 if the millisecond part of the timestamp 03/14/2023 03:09:26 PM was 246)
AM vs. PM:
- a: AM or PM in timestamp in lower case (Ex: pm)
- A: AM or PM in timestamp in upper case (Ex: PM)
Offsets:
- Z: Time zone offset (compared to UTC) expressed as hours and minutes. (Ex: -05:00 for Central Standard Time (CST) to UTC cross-comparison since there is a 5-hour difference between those time zones)
- X: Unix timestamp (Ex: 1678824566, since 1,678,824,566 seconds have elapsed since January 1, 1970 00:00:00 UTC (the Unix epoch) given that the timestamp is March 14, 2023 03:09:26 PM in CST)
Please feel free to explore these formatting options in your analyzer view and leverage the incredible abilities Domo can provide to your use case! I am an active Domo user, so you are all welcome to respond with your comments and questions about this topic, and I'll be more than happy to make additional edits and provide assistance in any way I can!
Comments
-
Great post! Thanks for documenting this for everyone!
**Check out my Domo Tips & Tricks Videos
**Make sure to any users posts that helped you.
**Please mark as accepted the ones who solved your issue.2 -
This is an excellent writeup and welcome @Jonathan53891! @GrantStowell / @eddiesmall any thoughts on this being incorporated into the KB?
1 -
Thank you so much @MarkSnodgrass - always happy to help out the Domo community!
1 -
Thank you so much @JasonAltenburg!
2 -
This is extremely cool, great work @Jonathan53891!
2 -
@MarkSnodgrass @Jason @trafalger I'm excited to share that @Jonathan53891's VERY helpful article above (totally voluntary) was just published in Domo's KB. This is the first of it's kind and we are very excited about it. Read the article HERE!
5 -
This is a fantastic write-up @Jonathan53891 ! Thank you so much for all your work pulling this together 😎
David Cunningham
** Was this post helpful? Click Agree 😀, Like 👍️, or Awesome ❤️ below **
** Did this solve your problem? Accept it as a solution! ✔️**2 -
@anna.yardley @Jonathan53891 This is awesome. Happy to see this collab happen!
2 -
Thank you so much, @david_cunningham & @JasonAltenburg! So excited that we were able to all work on this together and share this knowledge with the rest of the Domo community!
1
Categories
- All Categories
- 1.8K Product Ideas
- 1.8K Ideas Exchange
- 1.5K Connect
- 1.2K Connectors
- 296 Workbench
- 6 Cloud Amplifier
- 8 Federated
- 2.9K Transform
- 99 SQL DataFlows
- 613 Datasets
- 2.2K Magic ETL
- 3.8K Visualize
- 2.5K Charting
- 726 Beast Mode
- 52 App Studio
- 40 Variables
- 676 Automate
- 173 Apps
- 450 APIs & Domo Developer
- 45 Workflows
- 8 DomoAI
- 34 Predict
- 14 Jupyter Workspaces
- 20 R & Python Tiles
- 394 Distribute
- 113 Domo Everywhere
- 275 Scheduled Reports
- 6 Software Integrations
- 121 Manage
- 118 Governance & Security
- Domo Community Gallery
- 32 Product Releases
- 9 Domo University
- 5.4K Community Forums
- 40 Getting Started
- 30 Community Member Introductions
- 107 Community Announcements
- 4.8K Archive