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

Notifications

Announcements

Community site session details

Community site session details

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

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 522 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 364 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard