Hi - is there an easy expression to return the number of days in any given year? So if input is 5/2/2018 - I would like 365 days returned. Because of leap years, I want to make sure I get 366 days returned if a date falls within a leap year.
Thanks!
Solved! Go to Solution.
Hi @cireost
You could use this -
Create the field of Year
DateTimeYear([Date])
Calculate the Days of that Year
DateTimeDiff([Year]+'-12-31',[Year]+'-01-01', 'days') + 1
Cheers,
Have no idea why these 12-31 keep showing up.
But instead of those, you may need to reference 12-31 and 01-01, end and beginning of the year.
Cheers,
Maybe we have to play "guess the offending word"
DateTimeDiff([Year]+'-12-31',[Year]+'-01-01', 'days') + 1
Edit: It worked for me
Dan
Here's a fun alternative,