Combine two dates to text

39 views
Skip to first unread message

Randy Flinn

unread,
Aug 25, 2025, 5:45:17 PMAug 25
to mementodatabase
In the iOS environment, is there an easy way to combine two dates to text?

08/24/2025 & 08/25/2025

“08/24/2025 - 08/25/2025”

I have tried through JavaScript but no success

Bill Crews

unread,
Aug 25, 2025, 6:47:06 PMAug 25
to Randy Flinn, mementodatabase
Do a moment on each date into the mm/dd/yyyy format you want, then just use JavaScript concatenation to join them (x + " - " + y). Just check the box to include the mom to not.min.js library. Documentation at momentjs.com.


--
You received this message because you are subscribed to the Google Groups "mementodatabase" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mementodataba...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/mementodatabase/CAK8kyHaoZGDjxDgNsat206bzmDaUzaHu6JMye0pg_ryQ0dE0CQ%40mail.gmail.com.

Bill Crews

unread,
Aug 25, 2025, 6:49:08 PMAug 25
to Randy Flinn, mementodatabase
"Just check the box to include the mom to not.min.js library." should have been "Just check the box to include the moment.min.js library. 

Message has been deleted

David Gilmore

unread,
Aug 27, 2025, 1:28:53 PMAug 27
to mementodatabase
When submitting questions like this, it is always helpful to include an example of the Javascript that you have tried. And any error messages you got.

Your problem might be a simple Javascript syntax error.

Reply all
Reply to author
Forward
0 new messages