How to find if a value is null

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi

I have run a stored proc against a database to retrieve a list of date values. What i wanted to do is to add the values returned to an arraylist if the value is not null.

here is a small portion of my code that i am using...

Tr
MyConn.Open(
Dim rdr As SqlDataReade
rdr = SPretDate.ExecuteReader(
rdr.Read(
Dim FlightDate As String = (rdr.GetSqlDateTime(0).ToString

'if flightDate is not Null the
FlightDateArrayList.Add(FlightDate
'End i

I also wanted to minus 1 date from another to get the number of days gap
i.e in Psedo code...
daysGap = FlightDate - Flightdate

Im also stuck on how to achieve this. Can anyone offer any assistance
many th
 
if Not IsDBNull(flightDate) then
FlightDateArrayList.Add(FlightDate )
End if


I also wanted to minus 1 date from another to get the number of days gap.
daysGap = FlightDate.subtract(Flightdate2)



Jiten said:
Hi,

I have run a stored proc against a database to retrieve a list of date
values. What i wanted to do is to add the values returned to an arraylist if
the value is not null.
 
Back
Top