How to get number of Months since unix epoch
Hey guys,
Is there a filter option to get the number of months from the unix epoch?
I'm doing a query all records and looking to see if the user already has a record in the table for the current month, so looking to get the number of months since the unix epoch to compare. How would I go about this?
Thanks
Answers
-
To get such a value, I would would get the year, subtract 1969, multiply the difference by 12, and then add to that product the month of the year, followed by subtracting 1 from that sum.
But really, I would just store a value in the table of "month" as a "date" data type in the format YYYY-MM-DD where the "DD" is always "01". That would make an exact match much easier and not require weird math like my first paragraph! (As much as I do love my weird math!)
Categories
- All Categories
- 53 ? Announcements
- 47 ? Releases
- 37 ? Welcome
- 983 ? Help! I'm a Noob
- 125 ? No-Code Front-Ends
- 633 ? Working with APIs
- 439 ? Transforming data
- 126 ? Connect Xano to ...
- 50 ?? Find an Expert
- 348 ❓Other questions
- 35 ? Security
- 22 ✂️ Snippets
- 19 ? Showcase
- 7 ?️ Xano Chatter
- 62 ? Video Tutorials
- 171 ? Request a feature
- 229 ? Report a Bug
- 19 ? Templates & Extensions
- 7 ? Feedback