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

ISO datetime, loss of precision

This is a bit of a surprising one.

 

I have a sharepoint list, with the column field set to "text - single line"

 

I have a ISO time format string I want to save to it. "2019-10-15T11:31:05.435Z"

 

When it saves, during the save process, it converts it to a more standard date/time format, and looses precision (ie the decimal after seconds disapears).

 

The proof:  On the input section of update sharepoint item flow, it shows "2019-11-15T09:53:35.626Z" in the field.  In the output section, it shows "2019-11-15T09:53:35Z" in the field.  Now I could understand this if it were trying to save to a date/time field that is limited to 1 second precision, but not when saving to a Text - Singe line

 

I have got a workaround by adding whitespace, then trimming the white space when I retrieve the data, but it doesnt seem right to me.  What could be causing this to happen?  

 

 

2 ACCEPTED SOLUTIONS

Accepted Solutions
Community Support Team
Community Support Team

Re: ISO datetime, loss of precision

Hi @etalon,

 

I understand the issue is the timestamp will convert into Date formate automate though it is a single text.

The reason this issue will happen is when Flow gets the value of String, it checks the string first, and if it is a valid timestamp, it converts it to a SharePoint supported time format and then converts it.

 

Best Regards,
Community Support Team _ Lin Tu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

etalon
Level: Powered On

Re: ISO datetime, loss of precision

*edit*

The "solution" as it stands for this behaviour:

 

Add whitespace in front of your UTC time format string, save to a sharepoint text single line.  On retrieval, have a function that uses Trim() to get rid of the white space before use.

 

Original response:

Indeed, is there a fix for this?  (one that doesnt involve tricking Flow into not thinking its a time field.)  I wouldnt mind, but it looses precision!

View solution in original post

4 REPLIES 4
Community Support Team
Community Support Team

Re: ISO datetime, loss of precision

Hi @etalon,

 

I have tested on my side that creates a column with type is a string - Single line of text.Annotation 2019-11-18 104207.png

 And I get it via Flow, but it did not happen the same issue with yours.

Annotation 2019-11-18 104019.png

 

Annotation 2019-11-18 104455.png

So, could you please share the screenshot of your Flow configuration? And how do you save the Date into SharePoint list, via Flow or manually?

Best Regards,
Community Support Team _ Lin Tu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

etalon
Level: Powered On

Re: ISO datetime, loss of precision

Hello @v-litu-msft 

 

Thanks so much for looking at this.  I have attached screenshots to help.  This is from data being saved to the sharepoint list automatically via flow.

 

The issue I am sure is with the flow rather than sharepoint.  The datafields where it appears to work, if you look carefully, youll see its where I am adding whitespace to the start of the field.f1.PNGf2.PNGf3.PNGf4.PNGf5.PNG

Community Support Team
Community Support Team

Re: ISO datetime, loss of precision

Hi @etalon,

 

I understand the issue is the timestamp will convert into Date formate automate though it is a single text.

The reason this issue will happen is when Flow gets the value of String, it checks the string first, and if it is a valid timestamp, it converts it to a SharePoint supported time format and then converts it.

 

Best Regards,
Community Support Team _ Lin Tu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

etalon
Level: Powered On

Re: ISO datetime, loss of precision

*edit*

The "solution" as it stands for this behaviour:

 

Add whitespace in front of your UTC time format string, save to a sharepoint text single line.  On retrieval, have a function that uses Trim() to get rid of the white space before use.

 

Original response:

Indeed, is there a fix for this?  (one that doesnt involve tricking Flow into not thinking its a time field.)  I wouldnt mind, but it looses precision!

View solution in original post

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

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

firstImage

Incoming: New and improved badges!

We've given our badges an overhaul and also added some brand new ones!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Power Automate Community Video Gallery!

Top Kudoed Authors (Last 30 Days)
Users online (3,770)