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 Apps / DateTimeValue Conversi...
Power Apps
Unanswered

DateTimeValue Conversion Issue

(0) ShareShare
ReportReport
Posted on by 283

I am in the process of converting my application to sharepoint and i'm running into a weird (to me) error.  I use a label that is just a now() function.  This label is called Date100.  When I patch the data to my sharepoint list, I use a patch function.  Here are the two relevant lines.  

 

Date: DateTimeValue(date100.Text,"ca-ES"),
DateValue: Value(Text(Today(),"[$-en-US]yyyymmdd")),

 

The correct value should be 11/12/2019.  However, after the first entry it is reading it as 12/11/2019.  The date value is reading it correctly 2019-11-12.  What do I need to do to convert this to 11/12/2019? Note: The time is coming over correctly.

weord.PNG

 

 
Categories:
I have the same question (0)
  • Verified answer
    mdevaney Profile Picture
    29,989 Moderator on at

    @dyee4614 

    Any reason you have chosen the language "ca-ES" in your first line instead of "en-US" as is shown in your second line?  Changing the code...

     

    Date: DateTimeValue(date100.Text,"ca-ES")

     

    ...to this instead appears to result in 11/12/2019.  I've tested on my side.

     

    Date: DateTimeValue(date100.Text,"en-US")

     

    ---
    Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

  • v-monli-msft Profile Picture
    on at

    Hi @dyee4614 ,

     

    What is the column type of "DateValue" column in your SharePoint list? Is it a date column or a number column? Are you trying to convert date to number? If so, please use below formula in the label control:

    Value(Text(Now(),"[$-en-US]yyyymmdd"))

     

    Regards,

    Mona 

  • dyee4614 Profile Picture
    283 on at

    Ha.  That was it.  For some reason, I thought ca-ES was English.  This is embarrassing.

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 Apps

#1
WarrenBelz Profile Picture

WarrenBelz 796 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 327 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard