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 Apps / Power Apps + Excel Dat...
Power Apps
Answered

Power Apps + Excel DateTime field throws RFC3339 error when left blank in New Form

(1) ShareShare
ReportReport
Posted on by 12

Hi everyone,

I'm using Excel as a data source in Power Apps. I imported the Excel file and let Power Apps auto-generate the form and data cards.

The Excel table contains DateTime columns, and Power Apps generated DatePicker + Hour + Minute controls automatically.

The problem happens when:

  • I click New to create a new record

  • I leave one or both DateTime fields empty

  • Then Power Apps shows this error:

Expected value '' to be a valid RFC 3339 'date-time' format.
Allowed ISO 8601 format(s):
'YYYY-MM-DDThh:mm:ssZ',
'YYYY-MM-DDThh:mm:ss±hh:mm',
'YYYY-MM-DDThh:mm:ss'.

Important details:

  • The DateTime column in Excel is allowed to be blank

  • I want the field to be optional

  • When no value is entered, I want Power Apps to send Blank(), not throw an error

It seems like Power Apps / Excel connector is sending "" (empty string) instead of Blank() for DateTime fields, causing the RFC3339 parsing error.

My question:

How can I properly configure the DateTime DataCard (Default / Update / Required settings) so that:

  • Leaving the DateTime field empty does NOT throw the RFC3339 error

  • Blank values are accepted and saved correctly to Excel?

Is this a known limitation of the Excel connector?

Any help would be greatly appreciated. Thank you

error power app.png

Your file is currently under scan for potential threats. Please wait while we review it for any viruses or malicious content.

I have the same question (0)
  • Haque Profile Picture
    3,362 on at
    Hi @CU05020837-0,
     
    Let's find out how Excel behaves in conjunction with Power Apps - particularly for the date field, Excel expects either a properly formatted ISO 8601 datetime string or a true blank value, but Power Apps sometimes sends an empty string which Excel cannot parse, causing the RFC 3339 error.
     
    We need to convert empty or blank date/time inputs to Blank() or null in a way so that PA sends a proper blank value, no, not a string which is empty!
     
    So, to handle an optional DateTime field from Excel in Power Apps without causing RFC 3339 format errors, we can conditionally format and submit the value only if the user has selected a date.

    I believe this approach for patch or form update formula will help:

    If(
        IsBlank(DatePicker1.SelectedDate),
        Blank(), // We are sending a true blank  to Excel
        Text(
            DateAdd(
                DatePicker1.SelectedDate,
                Value(DropdownHour.Selected.Value),
                TimeUnit.Hours
            ) + Time(
                0,
                Value(DropdownMinute.Selected.Value),
                0
            ),
            "yyyy-mm-ddThh:mm:ss"
        )
    )
    

     

    Note: if you go for a Patch function, the following snippet will help:

    Patch(
        xlTable,
        Defaults(xlTable),
        {
            DateTimeColumn: Text(
                DateAdd(
                    DatePicker1.SelectedDate,
                    Value(DropdownHour.Selected.Value),
                    TimeUnit.Hours
                ) + Time(
                    0,
                    Value(DropdownMinute.Selected.Value),
                    0
                ),
                "yyyy-mm-ddThh:mm:ss"
            )
        }
    )
    

    Please let me know if these approaches help or not.


    I am sure some clues I tried to give. If these clues help to resolve the issue brought you by here, please don't forget to check the box Does this answer your question? At the same time, I am pretty sure you have liked the response!

     

  • CU05020837-0 Profile Picture
    12 on at

    Hi,

    Thank you very much for your previous answer. I followed your suggestion (conditionally sending Blank() or a properly formatted ISO string), and the RFC3339 error is now resolved. I really appreciate your help.

     

    However, I am now facing another issue.

    When I create a new record and leave the DateTime field empty, the DateTime control in the form automatically generates a value (a seemingly random date and time). This value then also appears in Excel after saving, even though I did not manually enter anything.

    So even though the format error is gone, the DateTime field is no longer truly blank — it auto-populates both in the app and in Excel.

    My goal is:

    • If the user does not select a date and time, the field should remain truly blank (no auto-generated value).

    • No default or random DateTime should be created in either the app or Excel.

    What would be the correct way to ensure that an optional DateTime field remains completely blank unless explicitly set by the user?

    Thank you again for your guidance.

     
  • Verified answer
    Haque Profile Picture
    3,362 on at
    Hi @CU05020837-0
     
    Ah- it seems one brought up other! Anyway good news is main one got fixed!
     
     
     
    The new issue you are facing because Default or Reset behaviour is probably not fully blank, causing Power Apps to interpret it as a non-empty value.
     
     
     
    1. Set the DatePicker Default property to:
     
    If(
        IsBlank(ThisItem) || IsBlank(ThisItem.DateTimeColumn),
        Blank(),
        DateValue(ThisItem.DateTimeColumn)
    )
    
    2. Do the same for the time dropdowns or time inputs (if any) also default to blank or zero only when a date is selected, for example, for Hour dropdown Default:
     
    If(
        IsBlank(DatePicker1.SelectedDate),
        Blank(),
        Hour(ThisItem.DateTimeColumn)
    )
    
    Please do the same for Minute dropdown.
     
     
    3. In the DataCard Update property, we need to use the conditional formula to send Blank() if no date is selected:
    If(
        IsBlank(DatePicker1.SelectedDate),
        Blank(),
        Text(
            DateAdd(
                DatePicker1.SelectedDate,
                Value(DropdownHour.Selected.Value),
                TimeUnit.Hours
            ) + Time(
                0,
                Value(DropdownMinute.Selected.Value),
                0
            ),
            "yyyy-mm-ddThh:mm:ss"
        )
    )
    
     
    Finally let's make sure the DataCard’s Required property is set to false so it doesn’t force a value.
     
     
    Please let me know if these steps help.
     
     

    I am sure some clues I tried to give. If these clues help to resolve the issue brought you by here, please don't forget to check the box Does this answer your question? At the same time, I am pretty sure you have liked the response!
  • CU05020837-0 Profile Picture
    12 on at

    Hi Haque,

    Thank you very much for your detailed explanation and guidance. I followed your approach and adjusted the Default and Update logic accordingly. That helped me understand much better how DatePicker, Hour/Minute dropdowns, and Excel DateTime handling actually work in Power Apps.

    After applying your suggestions and refining the timezone handling, everything is now working as expected — no more RFC3339 errors, no random default dates, and no timezone shifts between the app and Excel.

    I really appreciate the time you took to explain the logic clearly. It helped me not only fix the issue but also understand the root cause.

    Thanks again for your support!

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 Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Vish WR Profile Picture

Vish WR 421

#2
Valantis Profile Picture

Valantis 405

#3
timl Profile Picture

timl 337 Super User 2026 Season 1

Last 30 days Overall leaderboard