Dear Vijay G
sorry for again.
how can use year/month/day format at the time of update the date
field. when date is null it display // why ?
ssql="strdate from contracts where contractno='"& contractno &"'"
set rs=cn.Execute(ssql)
<TR>
<TD>Start Date (y/m/d)</TD>
<TD><%Response.Write("<INPUT ID=strdate name=strdate value='" & Year(rs("strdate")) & "/" & Month(rs("strdate")) & "/" & Day(rs("strdate")) & "'>")%></td></tr>
I controll this when date have to display (previous coding). when date to update (edit) how can solve this.
it should not display // at the update date field ?
OR
How can check at the time of retrieve the date from the database
(using the recordset object),
if date if null it display null otherwise display date ?
Regards.
Mateen
Quote:
quote:Originally posted by happygv
Mateen,
You should check if the date column is null once you retrieve it from the database (using the recordset object). Thats is the right approach, instead of formatting it into "fieldData" and then checking if that is null. I am not sure what you would want to display when the date column returns null. So you can decide on it and act accordingly.
Cheers,
-Vijay G
|