web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / datetime 0000-00-00 00...
Power Automate
Answered

datetime 0000-00-00 00:00:00 error

(0) ShareShare
ReportReport
Posted on by 21

Hi i am trying to insert a default datetime of 0000-00-00 00:00:00 if the field is empty but it kept giving me an error. Does power automate allow 0000-00-00 as datetime? 

 

formatDateTime('0000-00-00 00:00:00', 'yyyy-MM-dd HH:mm:ss')

 

jtanwm_0-1651809602565.png

 

Categories:
I have the same question (0)
  • Verified answer
    GeorgiosG Profile Picture
    1,013 Super User 2024 Season 1 on at

    Hi @jtanwm ,

     

    point is that you try to format the year 0000, month 00, day 00 to a valid date. But the problem is that there is no day 0 in the calendar, also not for month or year (obviously there was the year 0000 but you know what I mean ;)). 

     

    Therefore I would go for that 

    formatDateTime('0001-01-01 00:00:00', 'yyyy-MM-dd hh:mm tt')
     
    What I always use as default date time is utcNow(). This reflects the current date and time and is the most common used as default value for date time fields.
     
    formatDateTime(utcNow(), 'yyyy-MM-dd hh:mm tt')

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Automate

#1
David_MA Profile Picture

David_MA 262 Super User 2026 Season 1

#2
Haque Profile Picture

Haque 227

#3
Expiscornovus Profile Picture

Expiscornovus 225 Most Valuable Professional

Last 30 days Overall leaderboard