Date Formula Issue in AppSheet

I have a problem with the calculations in my app, where I use the expression

 

IF(DAY(TODAY()) > 27, EOMONTH(TODAY(), 1) + 1, DATE(YEAR(TODAY()), MONTH(TODAY()), 1))

 

I used it at 12:00 PM in the Central Mexico time zone, and it worked perfectly. However, when I used it at 7:00 PM, it started giving incorrect results. Instead of returning the first day of the current month, it gave me the first day of the next month. I have verified that the time zones for Google Sheets, AppSheet, and my phone are all set to Central Mexico time. Any recommendations on how to address this?

0 3 128
3 REPLIES 3

Aurelien
Google Developer Expert
Google Developer Expert

Hi @BernPrzO 


@BernPrzO wrote:

Instead of returning the first day of the current month, it gave me the first day of the next month


 

What about using this expression instead?

EOMONTH(TODAY(), -1) + 1

For reference:

EOMONTH() - AppSheet Help

 

Yes, my problem is that after 7 pm, it considers it as the next day.

Aurelien
Google Developer Expert
Google Developer Expert

That's weird, I never had any issue regarding this expression.

Just out of curiosity, would you mind trying with testing columns, all of these expressions, so that you can catch what output you get after 7pm with the followings:

TODAY()
NOW()
EOMONTH(TODAY(),0)
EOMONTH(TODAY(),-1)
EOMONTH(TODAY(), -1) + 1

 

Top Labels in this Space