Release : 8.6 (not release dependent - the behaviour is not specific to Gen)
Component : CA Gen Generator, Proxy
Support recreated the behaviour as follows. 2 date fields, one with a populated date and one with a null date:
Firstly it should be noted that the generated .ASP file is just sample generated code that must be customised to meet specific requirements.
This behaviour is working as expected as follows:
The VB data type DATE, which Gen uses for a COM Proxy date attribute, contains both date and time components and when the date is the zero date the default display format still shows the time i.e. "12:00:00 AM" (midnight).
Using their test model support changed the .ASP file to force the display of null for a zero date (when the value is "12:00:00 AM") i.e.
CHANGED:
response.write "<TD><h4>" & OutWs1Date1_form_name & "</h4></TD>" & vblf
response.write "<TD>" & op.OutWs1Date1 & "</TD></TR>" & vblf
response.write "<TR><TD><h3>Ws1</h3></TD></TR>" & vblf
response.write "<TR><TD></TD>"
response.write "<TD><h4>" & Out2Ws1Date1_form_name & "</h4></TD>" & vblf
response.write "<TD>" & op.Out2Ws1Date1 & "</TD></TR>" & vblf
TO:
response.write "<TD><h4>" & OutWs1Date1_form_name & "</h4></TD>" & vblf
If op.OutWs1Date1 <> "12:00:00 AM" Then
response.write "<TD>" & op.OutWs1Date1 & "</TD></TR>" & vblf
Else
response.write "NULL"
End If
response.write "<TR><TD><h3>Ws1</h3></TD></TR>" & vblf
response.write "<TR><TD></TD>"
response.write "<TD><h4>" & Out2Ws1Date1_form_name & "</h4></TD>" & vblf
If op.Out2Ws1Date1 <> "12:00:00 AM" Then
response.write "<TD>" & op.Out2Ws1Date1 & "</TD></TR>" & vblf
Else
response.write "NULL"
End If
The result was that no value is then displayed for the null date field:
The above example can be adapted to force whatever the value is required to be displayed when the date is NULL/zero.