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 derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Setting Date Variable to blank,null or empty 1

Status
Not open for further replies.

hovercraft

Technical User
Jun 19, 2006
236
US
Greetings,

Tek Tips search is down.

If I have a global variable of type = date, how can I set it to nothing.

mydate = null returns "invalid use of null"

Thanks in advance,
Hovercraft
 
Dates cannot be NULL. You either have to use a fictional date to equate to NULL (I use 1/1/1800 because I never deal with anything that old) or change your variable to a VARIANT type - which will accept NULL.

=======================================
People think it must be fun to be a super genius, but they don't realize how hard it is to put up with all the idiots in the world. (Calvin from Calvin And Hobbs)

Robert L. Johnson III
CCNA, CCDA, MCSA, CNA, Net+, A+, CHDP
VB/Access Programmer
 
Thanks mstrmage1768. I will use your suggestion of 1/1/1800. I was hoping there was some sort of ReDim statement or something that would allow a date type to be emptied ... or something along those lines.





 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top