Hey Guys,
I have used a formula that I copied from an answer here to create an end of month field.
I have transaction dates for sales and i want to get the end of month date for each transaction date. It works for all months except when a transaction takes place in any december for some reason, in any year. For any other months, it works fine.
This is the formula that I am using:
DATEADD(
DATETIME_PARSE(
DATETIME_FORMAT(
{TX DATE},
‘YYYY’
) & ‘-’ &
(VALUE(
DATETIME_FORMAT(
{TX DATE},
‘MM’
)
)
+ 1)
& ‘-01’,
‘YYYY-MM-DD’
) , -1, ‘day’
)
Can anyone try to pinpoint what’s wrong with it please?
Thank you
Hady