i have an HTML template stored in SQL. As follows
<label> Date Of Birth
<input type="text" name="txtDateOfBirth" id="txtDateOfBirth" class="" value="{{>~formatDateTime(DateOfBirth,"yyyy/MM/dd")}}" valtype="required" /> </label>
so the above works fine when i actually have a DateofBirth value. But sometimes when the date of birth is NULL it throws the Cannot read property 'indexOf' of null.
(because of no data)
my question is in this statement
{{>~formatDateTime(DateOfBirth,"yyyy/MM/dd")}}
how can i check if the DateOfBirth is NULL then dont do anything if its not NULL then proceeed to format the date