Click to See Complete Forum and Search --> : Getting a DateTime field value to a variable


HerickPaiva
May 2nd, 2001, 11:53 AM
Hi,

I am trying to grab a value from a datetime field in SQL, but it doesnt
return nothing. I have declared:

Dim strDate as String

strDate = rsInfo.Fields("UploadDate").Value


It doesnt return anything. Al my other fields work, except that they are
of the datatype text.

How should I declare it??

James Longstreet
May 2nd, 2001, 12:31 PM
Dim dtDate as Date
dtDate = rsInfo.Fields("UploadDate").Value






look into the Format function to format the date the way you want it to look in the string.



Jim Hewitt
Software Developer
Liberty Tax Service
www.LibertyTax.com

HerickPaiva
May 2nd, 2001, 12:36 PM
I have pasted the code into my project...but the variable is now "12:00AM"...how do I fix?