473,387 Members | 1,585 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

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 1439
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
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
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
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
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
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
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
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
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
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
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.