fbiego / ESP32Time

An Arduino library for setting and retrieving internal RTC time on ESP32 boards
MIT License
222 stars 37 forks source link

getDate() format #41

Closed caiovernaglia closed 6 months ago

caiovernaglia commented 6 months ago

It would be interesting to have an option to display the date in YYYY/MM/DD format. Currently, we only have the option that displays with the day of the week.

fbiego commented 6 months ago

you can use getTime("") and specify the format you want by passing it as a string. Check here https://cplusplus.com/reference/ctime/strftime/

for YYYY/MM/DD you would pass the format as getTime("%Y/%m/%d");