Function to retrieve the last day of a specific month

Hello, I would like to know if there is a function that can retrieve the last day of a specific month. For example, if I specify November, it should return 11/30. Is there a function that can do this?

Hi Zhou,

Great question! While Yeeflow doesn’t have a direct function to retrieve the last day of a specific month, here’s a simple approach:

  1. Retrieve the first day of the next month.
  2. Subtract 1 day from that date to get the last day of your desired month.

For example, if you’re looking for the last day of November, get the first day of December and subtract 1 day by using dateAdd() function. This method should give you the correct end date for any month.

1 Like