New to Appwrite and wondering how to format date time to just mm/dd/yy ?
- 0
- Self Hosted
- Databases
- General
thanks
Format it where?
when rendering the date on the page. User chooses the date and when it renders it shows 2025-02-15T00:00:00.000+00:00 . I just want the mm/dd/yy
You typically do that using your client side code. Most languages have a way to format dates
Err wait..what page?
snippet of the main.js file. It's just a index.html page. this is my second day trying out appwrite so sorry if this question isn't related to appwrite
Ahh welcome from 100Devs 👋
So JavaScript has ways to display dates localized for the user. And you can customize certain things too
So this is a basic method without many options: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toLocaleDateString
Thanks. I'm reaching out to folks in the 100Devs community too. And I Appreciate the article and quick help
This one has many more options: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat
Awesome! thanks. I'll give those a try.
one last thing. I've tried those resources and I can console log the correct format but it's still displaying an an ISO timestamp
Recommended threads
- User ID case sensitivity
I see that through REST (and SDK as well), getting a user is not case sensitive. And even though documentation does not clearly state that it is, the wording "V...
- Any way to temporarily bypass the email ...
Hey guys, any way to bypass the email verification to use the accounts again? i need to recover some projects that due to recent changes have been stopped, and ...
- How to use Sites on selfhosted appwrite
whenever I try to create a site even with template it says 404 nginx error