Suppose that depends on what language you're using etc... I've had some success working with the Julian format for dates... basically the Julian form of a date is the number of days since March 1, 1900, and null dates have Julians of 0. There are lots of resources online to find the formula for Julian... just run a search for it.
SheRa M&M's are better than money because you can eat them.
if(theDate == null || theDate == "" || theDate.length == 0 || theDate == "null"){
proceed without theDate;
}else {
proceed to use theDate;
}
T-SQL --
Code:
DECLARE @theDate DATETIME
SELECT @theDate = (SELECT begin_date FROM tableOne WHERE some_id = 'some_id_value')
SELECT @theDate
IF @theDate IS NULL
BEGIN
SELECT @theDate
END
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.