Count the actual number of days - in a year

What would the expression look like to count the number of days in the year to date? This should change according to the day…

0 6 696
6 REPLIES 6

I just had to make this one for myself, here ya go:

FLOOR(TOTALHOURS(
[DateTime] - DATETIME(CONCATENATE(“01/01/”, YEAR(DATE([DateTime])), " ", “00:00:00”,))
)) / 24

This assumes you’ve got a DateTime column.

Can I create a virtual date column to use?

2X_6_62001313ca5dda0ac92c679d6313f44a8c3389b3.png
MultiTech_Visions

February 8
I just had to make this one for myself, here ya go:

FLOOR(TOTALHOURS(
[DateTime] - DATETIME(CONCATENATE(“01/01/”, YEAR(DATE([DateTime])), " ", “00:00:00”,))
)) / 24

This assumes you’ve got a DateTime column.

The following gives you the day of the year (for today):

FLOOR(TOTALHOURS(
NOW() - DATETIME(CONCATENATE(“01/01/”, YEAR(Date(Now())), " ", “00:00:00”,))
)) / 24

Gave me the following result when I tested it:
2X_1_1ed53bfe88cd81aa91d057a90d1ae260cece91d6.png

Which is the day of the year for the date when I ran that test:

Thank you -i will try this out today. Thanks again…

You’re welcome; just a few hours before you posted your question I was figuring out how to do that for an app.

Ha. Was meant to be! Thanks again…

Top Labels in this Space