How do I check a date/time staticvar?

Hi

When I retrieve a staic var that is date/time, how do I check if it was actually set?

I have the following code:

r = ( Nz( StaticVarGet( "someDateTime" ) ) > 0 );
if (r) then
{
........
}

I know the proper way to compare dates is the datetimediff function. Here all I want is check if there is anything stored in the static var. What is the proper way to do it?

Use IsNull() function
or just directly use if() statement

r = StaticVarGet("somedatetime");

if( r )
{
   // r is set
}
1 Like

Thank you very much.