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 / Date format issue in a...
Power Apps
Suggested Answer

Date format issue in a form

(2) ShareShare
ReportReport
Posted on by 8
I have a form with several fields that take dates as input and then display them.
I used the following formula to correct the american date format
 
Text(ThisItem.DUE_DATE, "[$-en-GB]dd/mm/yyyy")
 
This worked for some of my fields but then other fields showed strange numbers - see SIV completed below - even though the columns with the data are all datetime.  Any reason for this error?
I have the same question (0)
  • Suggested answer
    MS.Ragavendar Profile Picture
    7,555 Super User 2026 Season 1 on at
     
    Can you please try this formula.
     
    If(
        IsBlank(Text(ThisItem.DUE_DATE, "[$-en-GB]dd/mm/yyyy")),
        "",
        IfError(
            Text(Text(ThisItem.DUE_DATE, "[$-en-GB]dd/mm/yyyy"),
                "[$-en-GB]dd/mm/yyyy"
            ),
            Text(
                DateAdd(
                    Date(1970, 1, 1),
    Text(ThisItem.DUE_DATE, "[$-en-GB]dd/mm/yyyy"),
                    TimeUnit.Seconds
                ),
                "[$-en-GB]dd/mm/yyyy"
            )
        )
    )
     
    ✅If this helped, please Accept as Solution to help others ❤️ A Like is appreciated 🏷️ Tag @MS.Ragavendar for follow-ups.
  • AS-30060821-0 Profile Picture
    8 on at
    This still doesnt work when the sharepoint data cell is empty
  • Suggested answer
    Valantis Profile Picture
    6,967 on at
     
    The strange numbers are Unix timestamps in milliseconds. This happens when SharePoint returns the date as a raw number instead of a date value for some columns, usually because the column's data type isn't being handled correctly by the connector.

    The clean fix that also handles empty cells:
    If(IsBlank(ThisItem.SIV_COMPLETED), "", Text(DateTimeValue(Text(ThisItem.SIV_COMPLETED)), "[$-en-GB]dd/mm/yyyy"))

    If DateTimeValue doesn't work, the column may be returning a Unix timestamp in milliseconds. In that case:

    If(IsBlank(ThisItem.SIV_COMPLETED), "", Text(DateAdd(Date(1970,1,1), Value(ThisItem.SIV_COMPLETED)/1000, TimeUnit.Seconds), "[$-en-GB]dd/mm/yyyy"))
    Check which formula works by first wrapping in a label with just Text(ThisItem.SIV_COMPLETED) to see what the raw value looks like. If it's a large number like 1748822400000, it's a Unix timestamp and you need the second formula.
     
      Best regards,

    Valantis   ✅ If this helped solve your issue, please Accept as Solution so others can find it quickly.

    ❤️ If it didn’t fully solve it but was still useful, please click “Yes” on “Was this reply helpful?” or leave a Like :).

    🏷️ For follow-ups  @Valantis.

    📝 https://valantisond365.com/ 💼 LinkedIn ▶️ YouTube
  • WarrenBelz Profile Picture
    156,229 Most Valuable Professional on at
    I will give you another one to try
    If(
       Value(ThisItem.DUE_DATE) > 1,
       Text(ThisItem.DUE_DATE, "[$-en-GB]dd/mm/yyyy")
    )
     
    Please Does this answer your question if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider answering Yes to Was this reply helpful? or give it a Like
    Visit my blog
    Practical Power Apps    LinkedIn  
  • AS-30060821-0 Profile Picture
    8 on at
    NOne of those are working.  It shows the correct date when there is a date in the source sharepoint but whenever its blank it shows the strange number. I tried to cover it with this formula but it still shows 1009756800000, even when specifically handled!
     
    If(
    IsBlank(ThisItem.SIV_WORK_RECEIVED) || ThisItem.SIV_WORK_RECEIVED = 1009756800000,
    "",
    Text(ThisItem.SIV_WORK_RECEIVED , "[$-en-GB]dd/mm/yyyy")
    )
     
     
  • Suggested answer
    Valantis Profile Picture
    6,967 on at
     
    Since individual control locking is unchecked but content still can't be edited, the issue is document-level protection overriding the control settings. <cite index="78-1">Even if individual content controls allow editing, the document may have active protection restricting changes.
     
    Check under Review > Restrict Editing. To fix, click Stop Protection.</cite>
    In the generated document, go to Review tab > Restrict Editing. If the pane shows restrictions are active, click Stop Protection. If it asks for a password, the template may have been saved with document protection enabled.
    In your Word template, before saving it for use in Power Automate:

    1. Go to Review > Restrict Editing
    2. Make sure no restrictions are enabled
    3. If they are, click Stop Protection and remove them
    4. Save the template and re-run the flow
     
    The Populate a Microsoft Word template action in Power Automate preserves document-level protection from the template. If the template had Restrict Editing active, every generated document will have the same restriction.
     
      Best regards,

    Valantis   ✅ If this helped solve your issue, please Accept as Solution so others can find it quickly.

    ❤️ If it didn’t fully solve it but was still useful, please click “Yes” on “Was this reply helpful?” or leave a Like :).

    🏷️ For follow-ups  @Valantis.

    📝 https://valantisond365.com/ 💼 LinkedIn ▶️ YouTube
  • WarrenBelz Profile Picture
    156,229 Most Valuable Professional on at
    This is very strange - I have worked with SharePoint date fields in Power Apps for many years and the only anomaly I have encountered is a "zero date" value which is a decimal (0:00 on "day 1") and is why I use Value(datefield) > 1 to pick up valid date s is a bit of a hack, but if you put
    If(
       Value(ThisItem.DUE_DATE) < 1 || Value(ThisItem.DUE_DATE) > 10000000000,
       "",
       Text(ThisItem.DUE_DATE, "[$-en-GB]dd/mm/yyyy")
    )
    It may work for you.
     
    Please Does this answer your question if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider answering Yes to Was this reply helpful? or give it a Like
    Visit my blog
    Practical Power Apps    LinkedIn  
  • AS-30060821-0 Profile Picture
    8 on at
     and If(
       Value(ThisItem.SIV_WORK_RECEIVED) > 1,
       Text(ThisItem.SIV_WORK_RECEIVED, "[$-en-GB]dd/mm/yyyy")
    )
     
    This one worked when put in format and defaultDate is left as parent.default
  • WarrenBelz Profile Picture
    156,229 Most Valuable Professional on at
    Yes that should also work - although normally the Format just needs to be 
    "[$-en-GB]dd/mm/yyyy"
    and the DefaultDate
    If(
       Value(ThisItem.SIV_WORK_RECEIVED) > 1,
       ThisItem.SIV_WORK_RECEIVED
    )
    Although your situation is a little strange, so if all of that works in the Format, then that is good.
     
    I assume that this is now solved.
     
    Please Does this answer your question if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider answering Yes to Was this reply helpful? or give it a Like
    Visit my blog
    Practical Power Apps    LinkedIn  
  • WarrenBelz Profile Picture
    156,229 Most Valuable Professional on at
    If this is now working, can you please mark the appropriate post as the solution to close the thread.
     
    Please Does this answer your question if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider answering Yes to Was this reply helpful? or give it a Like
    Visit my blog
    Practical Power Apps    LinkedIn  

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 June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 353 Most Valuable Professional

#2
11manish Profile Picture

11manish 150

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 68 Super User 2026 Season 1

Last 30 days Overall leaderboard