cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
dyee4614
Level: Powered On

DateTimeValue Conversion Issue

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

 

 
1 ACCEPTED SOLUTION

Accepted Solutions
Super User
Super User

Re: DateTimeValue Conversion Issue

@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."

View solution in original post

3 REPLIES 3
Super User
Super User

Re: DateTimeValue Conversion Issue

@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."

View solution in original post

Community Support Team
Community Support Team

Re: DateTimeValue Conversion Issue

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 

Community Support Team _ Mona Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
dyee4614
Level: Powered On

Re: DateTimeValue Conversion Issue

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

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors (Last 30 Days)
Users online (5,350)