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

SharePoint Date value loses a day when being emailed.

I've a flow configured to listen to a list that passes details to an email address as a HTML formatted email.

 

Nothing too complicated, just adding the list value for a column onto the email.

 

Somehow, Flow manages to drop a day between the list item being created and sending the email.

 

Is this taking the date value as a number and starting from 0 instead of 1 when translating it back into a date format?

8 REPLIES 8
Power Automate Staff RajRa
Power Automate Staff

Re: SharePoint Date value loses a day when being emailed.

> Somehow, Flow manages to drop a day between the list item being created and sending the email.

 

Can you give more specifics - Is the flow failing to run for a date? Is the date just in UTC format instead of the local time?

 

Power Automate Staff RajRa
Power Automate Staff

Re: SharePoint Date value loses a day when being emailed.

 

 

Can you give more specifics - Is the flow failing to run for a date? Is the date just in UTC format instead of the local time?

 

markowen58
Level: Powered On

Re: SharePoint Date value loses a day when being emailed.

yeah, sorry, fired that OP off quickly.

 

I've a date and time column set to date only, the flow is firing fine when a new item is added to the list, all the column details are being placed into an email that's being sent without fault, what appears to be happening is that when the details are collected by flow to be placed in an email the date only field is losing a day. I'm presuming this is becuase it's translating the date as a number value and then translating it back to a date from 0 instead of 1 when emailing.

 

Date 'and' time columns remain unaffected as this pulls though the full value in a date and time format (in UTC).

 

Nothing has changed at our end, time zone is set to UTC, but as it's date only I dont think this is affecting it. It's also changed after the flow was set up.

 

it's a visitor parking slot booking form, so it has a date field and 'from' and 'to' choice columns as they're booked on an hourly basis for working hours.

 

I've currently set it to link directly to the sharepoint list item as this isn't affected but is an extra click and I'd rather have the correct details in an email for reception to process the request.

 

I might create a calculated column so the value is passed through as a string instead, but this appears to be a fault at your end that needs fixing.

Power Automate Staff RajRa
Power Automate Staff

Re: SharePoint Date value loses a day when being emailed.

There's no translation of date fields in the flow system. Values are relayed as is across actions - Note that most date fields require a date/time value in UTC. So in your case, I would recommend you still use a date/time field as this avoids conversion issues - using just a date value proabably defaults to UTC time @12 am for that day (default value)

markowen58
Level: Powered On

Re: SharePoint Date value loses a day when being emailed.

That still doesnt offer an explanation as to why it's started to lose a day. 

 

I dont want to pass a date and time value across as I need to pass two time values across as well. The form on sharepoint would then have a third time field to enter that's just going to cause confusion.

 

I'll create a calculated column that passes a string across instead and add this to my increasing list of disappointments with Flow.

 

I would simply like it to pass the value it's given across, I fail to see how UTC causes the date value to lose a day whether it defaults to 12am or not. 

Power Automate Staff RajRa
Power Automate Staff

Re: SharePoint Date value loses a day when being emailed.

Sorry for your trouble, If you can provide the flow Id and the run (go into the history for hte flow and send me the URL) and I can take a look to see what's going on.

 

thanks

 

markowen58
Level: Powered On

Re: SharePoint Date value loses a day when being emailed.

Cheers

 

Here's the URL

https://flow.microsoft.com/manage/environments/Default-ab37b40e-6cca-4507-b964-ae2129653c16/flows/sh...

 

I've currently swapped it for a calculated field on the sharepoint list.

 

It might be a bit tricky to work out without the sharepoint list dates as well though.

Power Automate Staff RajRa
Power Automate Staff

Re: SharePoint Date value loses a day when being emailed.

Sorry for the delay, we ran into a similar issue today - looks like you using a Date and time column from a sharepoint list? Quote below - you have hit this issue if the end time is 12 am on the end date.

 

" The “date only” setting on DateTime columns is really a UI-level construct. In the database, we actually store midnight – i.e. 12AM – of the date you selected and only display the date portion. However, the calendar uses “date and time” columns. As a result, when you get the data from the custom list “date only” columns and transfer them into the calendar’s “date and time” columns, you end up with 12am on the correct dates – as shown below. Unfortunately, when writing the dates into the calendar columns, it is impossible to automatically determine what time to pick – for example, from a business logic point of view, the Start Time should get assigned a time of 12:00 AM and the End Time a time of 11:59 PM. "

 

Helpful resources

Announcements
firstImage

Power Platform Online Conference

Speakers, submit your sessions now! Call for speakers ends Feb. 10!

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

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 Solution Authors
Top Kudoed Authors (Last 30 Days)
Users online (3,244)