Please enable JavaScript to view this site.

Codolex

The Check activity can be used to validate a few things about a date time value. The return value will always be a boolean.

Uses System.DateUtils

 

Check

 

IsAM

This check will validate if the given date time is in AM time range. 00:00 - 11:59 in 24hour notation.

 

Example:

Date to check: 2024-01-01  

begin

var Variable: Boolean;

 Variable := IsAM(DateToCheck);

end;

Result: True

 

IsPM

This check will validate if the given date time is in PM time range. 12:00 - 23:59 in 24hour notation.

 

Example:

Date to check: 2024-01-01  

begin

var Variable: Boolean;

 Variable := IsPM(DateToCheck);

end;

Result: False

 

InLeapYear

This check only looks at the year in a given date time, and will tell you if it's in a leap year or not.

 

Example:

Date to check: 2024-01-01  

begin

var Variable: Boolean;

 Variable := IsInLeapYear(DateToCheck);

end;

Result: True

 

SameDay

This check will validate if it is the same day as another date. It has to be the exact day (year, month, day). Time on the day does not matter.

 

Example:

Date to check: 2024-01-01 - Check date value: 2024-01-08

begin

var Variable: Boolean;

 Variable := IsSameDay(DateToCheck, SameDateToCheck);

end;

Result: False

s

Today

This check will validate if it is the same day as today, so the outcome will be dependent on the day the program runs.

 

Example:

Date to check: 2024-01-01  

begin

var Variable: Boolean;

 Variable := IsToday(DateToCheck);

end;

Result: False

© by GDK Software