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 / Error Date Field creat...
Power Automate
Answered

Error Date Field creating CSV

(0) ShareShare
ReportReport
Posted on by 394 Super User 2024 Season 1

Dear All,

 

I have two date fields in a create CSV and one works and one not. 

 

Error is:

The column values could not be evaluated: 'The template language function 'formatDateTime' expects its first parameter to be of type string. The provided value is of type 'Null'.

 

The formula which works for date columns is formatDateTime(item()?['Date'],'dd-MM-yyyy') however using it on another column just created errors.

 

Any help is appreciated.

 

Daniel

Categories:
  • Verified answer
    SudeepGhatakNZ Profile Picture
    14,396 Most Valuable Professional on at

    Some date values in your dataset must be empty. You can run a null check before using formatDateTime. Try

     

    if(empty(item()?['Date']),null,formatDateTime(item()?['Date'],'dd-MM-yyyy'))
  • DLCaterhamSch Profile Picture
    394 Super User 2024 Season 1 on at

    You are right, just checked and one entry is null. Thank you.

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
David_MA Profile Picture

David_MA 245 Super User 2026 Season 2

#2
11manish Profile Picture

11manish 233 Super User 2026 Season 2

#3
Valantis Profile Picture

Valantis 136 Super User 2026 Season 2

Last 30 days Overall leaderboard