Click to See Complete Forum and Search --> : Setting Label.Caption from a Date/Time Field Value


HerickPaiva
May 7th, 2001, 11:16 AM
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

James Longstreet
May 7th, 2001, 12:10 PM
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