Start Date And End Date, Must not cross a Year boundary

Hi Community,

Can you help me build the logic for date not crossing the year boundary

Solution

Hi Ritesh,

See if this condition Could Meet other requirements of Dates coherence in your application.


To Make the Condition meet the requirements exactly as specified you can put the condition as 

Year(StartDate) = Year(CurrDate()) and Year(EndDate) = Year(CurrDate())

Thankyou Varada Rajan

In Outsystems there is a Builtin function Year() you can use. Year(<Date>) strips of the year of a given Date returning the year as an integer. You can use that for comparing start and end date. 

Hi Ritesh

you could try with below links as well, May be that could you help you to put date validation

https://www.outsystems.com/forums/discussion/52522/inputs-with-start-date-and-end-date-of-the-current-month/ 

https://www.outsystems.com/forums/discussion/37848/date-validation-on-if-condition/ 

you can make changes accordingly 

Champion

HI 

You can use the built-in function AddYears.

AddYears(StartDate,1) <= EndDate

Regards,

Hi Ritesh,

 Check this Year(Start Date) and year(EndDate) should be same 

Regards

Shradha 

Solution

Hi Ritesh,

See if this condition Could Meet other requirements of Dates coherence in your application.


To Make the Condition meet the requirements exactly as specified you can put the condition as 

Year(StartDate) = Year(CurrDate()) and Year(EndDate) = Year(CurrDate())

Thankyou Varada Rajan

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.