473,513 Members | 2,391 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to find if a value is null

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

Nov 22 '05 #1
1 1446
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" <an*******@discussions.microsoft.com> wrote in message
news:99**********************************@microsof t.com...
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....

Try
MyConn.Open()
Dim rdr As SqlDataReader
rdr = SPretDate.ExecuteReader()
rdr.Read()
Dim FlightDate As String = (rdr.GetSqlDateTime(0).ToString)
'if flightDate is not Null then
FlightDateArrayList.Add(FlightDate )
'End if
I also wanted to minus 1 date from another to get the number of days gap.
i.e in Psedo code....
daysGap = FlightDate - Flightdate2

Im also stuck on how to achieve this. Can anyone offer any assistance?
many thx

Nov 22 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
3612
by: JJA | last post by:
I would like some advice on a data and query problem I face. I have a data table with a "raw key" value which is not guaranteed to be valid at its source. Normally, this value will be 9 numeric...
2
8816
by: PC | last post by:
Hi, I have used the DLast("!","")function to find and display the last entry in a table. How would I go about displaying the last record in a table that is not Null? Thanks in advance ...pc
26
30888
by: Martin R | last post by:
Hi, How to find first not null value in column whitout chacking whole table (if there is a not null value then show me it and stop searching, the table is quite big)? thx, Martin *** Sent...
36
3795
by: Rahul K | last post by:
Hello all Suppose I am given a datatype say X in C. How can i find its size without declaring a variable or pointer variable of that type, and of course without using sizeof operator.
5
5262
gekko3558
by: gekko3558 | last post by:
I am writing a simple binary search tree (nodes are int nodes) with a BSTNode class and a BST class. I have followed the instructions from my C++ book, and now I am trying to get a remove method...
2
5060
by: emily224 | last post by:
Hello, I have been trying to understand this source code, which I retreived from my online course test. I would like to know how to find the answer for the question on the test. Im sure the answer...
4
68114
by: emily224 | last post by:
Hello, I have been trying to understand this source code, which I retreived from my online course test. I would like to know how to find the answer for the question on the test. Im sure the answer...
5
4517
by: YaoBao | last post by:
Is any ColdFusion script I can put on my webpage that will create a search bar so people can type keywords to match it on the current page in my website? It will be exactly like the finder search bar...
2
2649
by: slizorn | last post by:
hi guys, i need to make a tree traversal algorithm that would help me search the tree.. creating a method to search a tree to find the position of node and to return its pointer value basically i...
0
7265
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7388
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
7111
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7539
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
5095
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
3240
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3228
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1605
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
461
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.