0
DROP FUNCTION IF EXISTS IsDate;
CREATE FUNCTION IsDate
(
  dateString VARCHAR(32)
)
RETURNS BOOLEAN
READS SQL DATA
BEGIN
  DECLARE myDate DATE;
  DECLARE result BOOL;

  SET result = True;

  TRY
    SELECT CAST(dateString AS Date) AS myDate FROM #Dummy;
  CATCH ERROR_MESSAGE <> ''
     SET result = False;
  END;

  RETURN result;
END;
Category: 
SQL Functions & Procedures
Current Version: 
1.00
Supported Products: 
NexusDB V2
NexusDB V3
Home