Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

JSTL null date

Status
Not open for further replies.

leekikwan

Programmer
Nov 21, 2003
10
0
0
US
I tried to update a record which has a date field.
Following code works fine when it has a date value.
However, it is not working when that field is null.

<fmt:parseDate var="ADOB" value="${param.DOB}" dateStyle='short' />

<sql:transaction>
<sql:update var='updateDemo'>
UPDATE T_PATIENT_DEMO
SET dob= ?
WHERE pid= '${param.PID}'
<sql:dateParam value="${ADOB}" type="date" />
</sql:update>
</sql:transaction>
 
I don't really use JSTL, but from the looks of it you are trying to format an object which is null - which I guess is going to fail - how can it parse an object which is null ?

--------------------------------------------------
Free Java/J2EE Database Connection Pooling Software
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top