I have a table with work months like here:

I'm trying to calculate the start and end datetimes of the month but the formula is giving inconsistent answers. It's correct for some months but there's an error in End Dates for March, May, July, October and December.
Here is the formula I'm using for Start and End dates:
DATEADD(DATETIME_PARSE(YEAR({Work Month}) & "-" & MONTH({Work Month}) & "-01", 'YYYY-MM-DD'),-7,'hour')
What am I doing wrong?

