SOLVED

Incorrect calculation using Dates

%3CLINGO-SUB%20id%3D%22lingo-sub-2228332%22%20slang%3D%22en-US%22%3EIncorrect%20Date%20calculation%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2228332%22%20slang%3D%22en-US%22%3E%3CP%3EHello%20All%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20have%20a%20simple%20date%20calculation%20that%20is%20showing%20incorrect.%3C%2FP%3E%3CP%3EI%20need%20the%20time%20in%20days%2Fhours%2Fmins%20between%20two%20date%2Ftime%20fields%3C%2FP%3E%3CP%3EBoth%20dates%20are%20calculated%20using%20utcNow()%20in%20flow.%3C%2FP%3E%3CP%3EI've%20have%20added%20the%20calculated%20column%20and%20the%20output%20on%20sharepoint%20list%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EPlease%20see%20attached..Thank%20you%20for%20your%20time.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2228332%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3ESharePoint%20Online%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2229082%22%20slang%3D%22en-US%22%3ERe%3A%20Incorrect%20calculation%20using%20Dates%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2229082%22%20slang%3D%22en-US%22%3E%3CP%3EHi%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F1005248%22%20target%3D%22_blank%22%3E%40mogornua1%3C%2FA%3E%2C%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EYou%20need%20to%20calculate%20days%20between%20two%20dates%20with%20DATEDIF%20function.%3C%2FP%3E%0A%3CP%3EHere%20is%20my%20example%2C%20check%20that%20column%20names%20are%20correct.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3DCONCATENATE(DATEDIF(%5BEDT%20Assigned%20Date%5D%2C%5BSC%20Submitted%20Date%5D%2C%22d%22)%2C%22%3A%22%2CTEXT(%5BEDT%20Assigned%20Date%5D-%5BSC%20Submitted%20Date%5D%2C%22hh%3Amm%22))%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E
Occasional Contributor

Hello All,

 

I have a simple date calculation that is showing incorrect.

I need the time in days/hours/mins between two date/time fields

Both dates are calculated using utcNow() in flow.

I've have added the calculated column and the output on sharepoint list

 

Please see attached..Thank you for your time.

3 Replies
best response confirmed by Matti_Paukkonen (MVP)
Solution

Hi @mogornua1,

 

You need to calculate days between two dates with DATEDIF function.

Here is my example, check that column names are correct.

 

=CONCATENATE(DATEDIF([EDT Assigned Date],[SC Submitted Date],"d"),":",TEXT([EDT Assigned Date]-[SC Submitted Date],"hh:mm"))

 

 

 

 

@Matti_Paukkonen - Thank you, This looks good, much appreciated.
@Matti_Paukkonen,

some entries in the list are coming out with Name? and some entries are working fine..Any ideas?

Thanks