Setting Label.Caption from a Date/Time Field Value
Hi,
I need to set a labe's caption to a date/time field from a SQL database. I have setup the connetion string and all and I define this variable in VB:
Dim dtDate As Date
dtDate = rsInfo.Fields("UploadDate").Value
The Field "Upload Date" looks like this:
4/27/2001 11:12:09 AM
But my label's caption show up like this:
12:00:00 AM
How can I set it correctly????? Please Help,
Herick
Re: Setting Label.Caption from a Date/Time Field Value
Use the Format function to format the date as you want it, and then set the caption to that.
Jim Hewitt
Software Developer
Liberty Tax Service
www.LibertyTax.com