|
-
May 2nd, 2001, 11:53 AM
#1
Getting a DateTime field value to a variable
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??
-
May 2nd, 2001, 12:31 PM
#2
Re: Getting a DateTime field value to a variable
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
-
May 2nd, 2001, 12:36 PM
#3
Re: Getting a DateTime field value to a variable
I have pasted the code into my project...but the variable is now "12:00AM"...how do I fix?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|