Skip to content
Init is coming / May 19 - 23
Back

New to Appwrite and wondering how to format date time to just mm/dd/yy ?

  • 0
  • Self Hosted
  • Databases
  • General
Insolent Rug
15 Feb, 2025, 18:13

thanks

TL;DR
Developer new to Appwrite wondering how to format date time to mm/dd/yy. Received resources on Intl/DateTimeFormat and Date/toLocaleDateString methods. Can use client-side code to customize date formatting.
Steven
15 Feb, 2025, 18:19

Format it where?

Insolent Rug
15 Feb, 2025, 18:21

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

Steven
15 Feb, 2025, 18:21

You typically do that using your client side code. Most languages have a way to format dates

Steven
15 Feb, 2025, 18:22

Err wait..what page?

Insolent Rug
15 Feb, 2025, 18:24

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

Steven
15 Feb, 2025, 18:24

Ahh welcome from 100Devs 👋

Steven
15 Feb, 2025, 18:25

So JavaScript has ways to display dates localized for the user. And you can customize certain things too

Steven
15 Feb, 2025, 18:26
Insolent Rug
15 Feb, 2025, 18:27

Thanks. I'm reaching out to folks in the 100Devs community too. And I Appreciate the article and quick help

Insolent Rug
15 Feb, 2025, 18:29

Awesome! thanks. I'll give those a try.

Insolent Rug
15 Feb, 2025, 18:59

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

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more