Calculated column showing number of days between dates

%3CLINGO-SUB%20id%3D%22lingo-sub-2974662%22%20slang%3D%22en-US%22%3ECalculated%20column%20showing%20number%20of%20days%20between%20dates%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2974662%22%20slang%3D%22en-US%22%3E%3CP%3EHi%2C%3C%2FP%3E%3CP%3EI%20want%20a%20column%20that%20shows%20the%20number%20of%20days%20between%20a%20date%20thats%20in%20another%20field%20and%20todays%20date.%20I%20tried%20with%20this%20%3Dfloor((Number(%5BDatefield%5D)-Number(%40now))%2F(1000*60*60*24))%2C%20but%20it%20failed.%20Any%20ideas%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2974662%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3ELists%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3ESharePoint%20Online%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2974784%22%20slang%3D%22en-US%22%3ERe%3A%20Calculated%20column%20showing%20number%20of%20days%20between%20dates%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2974784%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F155096%22%20target%3D%22_blank%22%3E%40Tonje%20Waasj%C3%B8%3C%2FA%3E%26nbsp%3Byou%20can%20use%20the%20%3CSTRONG%3EDATEDIF%3C%2FSTRONG%3E%20function%20%3DDATEDIF(TODAY()%2CExpiry%2C%22D%22)%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-center%22%20image-alt%3D%220a-SP-Settings.png%22%20style%3D%22width%3A%20365px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F327583i3F85E2BE6C267ECF%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%220a-SP-Settings.png%22%20alt%3D%220a-SP-Settings.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-center%22%20image-alt%3D%220-SP-List.png%22%20style%3D%22width%3A%20467px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F327584i4963C13231A7CFF8%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%220-SP-List.png%22%20alt%3D%220-SP-List.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ERob%3CBR%20%2F%3ELos%20Gallardos%3CBR%20%2F%3E%3CFONT%20size%3D%222%22%20color%3D%22%23006400%22%3EIntranet%2C%20SharePoint%20and%20Power%20Platform%20Manager%20(and%20classic%201967%20Morris%20Traveller%20driver)%3C%2FFONT%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E
New Contributor

Hi,

I want a column that shows the number of days between a date thats in another field and todays date. I tried with this =floor((Number([Datefield])-Number(@now))/(1000*60*60*24)), but it failed. Any ideas?

 

 

2 Replies

@Tonje Waasjø you can use the DATEDIF function =DATEDIF(TODAY(),Expiry,"D")

 

0a-SP-Settings.png

 

0-SP-List.png

 

Rob
Los Gallardos
Intranet, SharePoint and Power Platform Manager (and classic 1967 Morris Traveller driver)

 

 

 

Thank you for your answer Rob. When I paste this in, I get a syntax error message. I just change the name of the column. =DATEDIF(TODAY(),Sluttdato,"D")