Home > Date And Time > Relative date time > SDATE Function > The start date involve last day of february
Report generated 11-04-2023 10:42

SDATE Function

  Sdate   Windows   Relative Date   Date

The start date involve last day of february

That not maintain an end of month when the day value is less than 31.

Scenario Outline

Given the date <start date>
When relative delta <relative delta> is applied
Then the relative date should be <relative date>

Examples: 

# Description Start Date Relative Delta Relative Date
1 next month 2021-02-28 months=+1 2021-03-28
2 last month 2021-02-28 months=-1 2021-01-28
3 next two months 2021-02-28 months=+2 2021-04-28
4 next three months 2021-02-28 months=+3 2021-05-28
5 next year 2021-02-28 years=+1 2022-02-28
6 next three year (2024 leap year!) 2021-02-28 years=+3 2024-02-28
Steps Outcome
SUCCESS 016ms
SUCCESS 015ms
SUCCESS 018ms
SUCCESS 021ms
SUCCESS 028ms
SUCCESS 016ms
SUCCESS 0.14s
Serenity BDD version 3.6.22