YEAR()

Hello I need help I'm trying to get the first day and last  day of the current year how can I get it I tried with this but don't work.

First day of the year: Year(Today()),1,1

Last day of the year: Year(Today()),12,31

if someone can help me i will appreciate it 

Thank you

Solved Solved
0 2 167
1 ACCEPTED SOLUTION

Aurelien
Google Developer Expert
Google Developer Expert

Hi @Josuedivas 

Can that help you ? (not tested)

 

DATE("01/01/"&YEAR(TODAY())))

DATE("12/31/"&YEAR(TODAY())))

 

For reference:

DATE() - AppSheet Help

EDIT:

Alternatively, you may want to try (tested):

 

1st day of year:
EOMONTH(TODAY(), (0-MONTH(TODAY())))+1

last day of year:
EOMONTH(TODAY(), (12-MONTH(TODAY())))

 

For reference:

EOMONTH() - AppSheet Help

@Steve do you think it could be relevant to add these two examples in the EOMONTH() documentation ?

 

View solution in original post

2 REPLIES 2

Aurelien
Google Developer Expert
Google Developer Expert

Hi @Josuedivas 

Can that help you ? (not tested)

 

DATE("01/01/"&YEAR(TODAY())))

DATE("12/31/"&YEAR(TODAY())))

 

For reference:

DATE() - AppSheet Help

EDIT:

Alternatively, you may want to try (tested):

 

1st day of year:
EOMONTH(TODAY(), (0-MONTH(TODAY())))+1

last day of year:
EOMONTH(TODAY(), (12-MONTH(TODAY())))

 

For reference:

EOMONTH() - AppSheet Help

@Steve do you think it could be relevant to add these two examples in the EOMONTH() documentation ?

 

Thank you it works perfectly 

Top Labels in this Space