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 / Power Automate DateTim...
Power Automate
Answered

Power Automate DateTime Format Error

(1) ShareShare
ReportReport
Posted on by 48

Ok I'm having some sort of unsolvable issue with it comes to my datetime columns. I've tried everything I can think of and nothings working. What's even more frustrating is that I've done this before and it worked in the past. I still have the original automation and I even tried mimicking the entire automation which isn't much. 

I have a manual trigger, Excel: list rows present in table, and SharePoint: Create Item. I've tried with ISO 8601 format and without with data manipulations in a compose statement to verify the values. Even then it says something is wrong. I even tried chat GPT, searched all over the internet and nothing is helping.

 

Error Message

The 'inputs.parameters' of workflow operation 'Create_item' of type 'OpenApiConnection' is not valid. Error details: Input parameter 'item/Last_Worked' is required to be of type 'String/date-time'. The runtime value '""' to be converted doesn't have the expected format 'String/date-time'.

With ISO 8601, I even tried this using an 'or' instead of a nested if.

if(
empty(item()?['Last Worked']),
null,
if(
equals(item()?['Last Worked'], ''),
null,
concat(
substring(item()?['Last Worked'], 0, 10),
'T',
substring(item()?['Last Worked'], 11, 8),
'Z'
)
)
)

 

Without ISO 8601, I even tried 'null' instead of '1899-12-30'

addSeconds(
addDays('1899-12-30', int(first(split(outputs('LastWorked'), '.')))),
int(
formatNumber(
Add(
mul(
float(concat('0.', last(split(outputs('LastWorked'), '.')))),
86400
)
,1
),
'#0')
)
)

 

Please help me, this is driving me crazy knowing it worked before.

Categories:
  • v-yetonggu-msft Profile Picture
    Microsoft Employee on at

    Hi @anthonjhnon1 ,

    Could you please give me an example of your datetime return value?

     

    Best Regards,

    Sunshine Gu

  • anthonjhnon1 Profile Picture
    48 on at

    anthonjhnon1_0-1719797762522.png

    There are a lot of null values in this column and I believe that's the problem. Another column I have for time called ['TS'] has a mostly filled data and excel raw input shows as '2024-06-05'.

     

    anthonjhnon1_1-1719797900829.png

     

  • anthonjhnon1 Profile Picture
    48 on at

    Also right before this 'Without ISO 8601, I even tried 'null' instead of '1899-12-30'  I had a compose statement that would return '0.0' if value was empty(). And it returned '0.0' so I know it was null or empty.

  • v-yetonggu-msft Profile Picture
    Microsoft Employee on at

    Hi  @anthonjhnon1 ,

    Please select the ISO 8601 format and try this expression:

     

    if(empty(item()?['TS']),null,item()?['TS'])
    if(empty(item()?['Last_Worked']),null,item()?['Last_Worked'])

     

    Best Regards,

    Sunshine Gu

  • anthonjhnon1 Profile Picture
    48 on at

    This is what I had in my original automation that worked and I believe I tried this already.
    I just tried and still getting the same error message.

  • v-yetonggu-msft Profile Picture
    Microsoft Employee on at

    Hi @anthonjhnon1 ,

    If you have the wrong column name in your expression, please try the correct column name, and please switch to the classic designer.

    if(empty(items('Apply_to_each')?['Last_worked']),null,items('Apply_to_each')?['Last_worked'])

     

    Best Regards,

    Sunshine Gu

     

  • anthonjhnon1 Profile Picture
    48 on at

    The column name is a good catch. Even thought my excel file doesn't have a '_', Power Automate applied one. Also seems I can't have anything in the 'item()'.

    anthonjhnon1_0-1719800145120.png

     

    However, I'm still getting the same error message even after using the correct column name.

     

  • v-yetonggu-msft Profile Picture
    Microsoft Employee on at

    Hi @anthonjhnon1 ,

    Could you please show me a screenshot of your flow?

    I'd like to see what loops are nested on the outside of your create item.

    Best Regards,

    Sunshine Gu

  • anthonjhnon1 Profile Picture
    48 on at

    anthonjhnon1_0-1719800575696.png

    anthonjhnon1_1-1719800599932.png

     

    These are not all the columns.

  • v-yetonggu-msft Profile Picture
    Microsoft Employee on at

    Hi @anthonjhnon1 ,

    感谢您的快速回复。

    Note that to reference the parameters in Apply to each, use items('Apply_to_each').

    vyetonggumsft_0-1719801057445.png

    Please try this expression:

    if(empty(items('Apply_to_each')?['Last_worked']),null,items('Apply_to_each')?['Last_worked'])

    Best Regards,

    Sunshine Gu

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

Leaderboard > Power Automate

#1
11manish Profile Picture

11manish 321 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 271

#3
Henil Profile Picture

Henil 115

Last 30 days Overall leaderboard