PC Review


Reply
Thread Tools Rate Thread

Date not appearing properly in recordset

 
 
Pendragon
Guest
Posts: n/a
 
      15th Feb 2010
Access03

Dim StartDate as Date

I have a recordset which grabs a date-formatted field. StartDate is set to
this recordset field. In the immediate window, rsDetail("RevDate") properly
shows 1/31/2010; however, StartDate shows 12:00:00 AM.

Can somebody explain why this would be the case?

Thanks!
 
Reply With Quote
 
 
 
 
Daryl S
Guest
Posts: n/a
 
      15th Feb 2010
Pendragon -

It looks like the control is formated as Time - change the format to the
Date format you want to see.

--
Daryl S


"Pendragon" wrote:

> Access03
>
> Dim StartDate as Date
>
> I have a recordset which grabs a date-formatted field. StartDate is set to
> this recordset field. In the immediate window, rsDetail("RevDate") properly
> shows 1/31/2010; however, StartDate shows 12:00:00 AM.
>
> Can somebody explain why this would be the case?
>
> Thanks!

 
Reply With Quote
 
Pendragon
Guest
Posts: n/a
 
      15th Feb 2010
The field in the table is set as Date/Time and the format is Short Date with
an Input Mask of 99/99/9999;; There are no time displays for any records in
this field.

"Daryl S" wrote:

> Pendragon -
>
> It looks like the control is formated as Time - change the format to the
> Date format you want to see.
>
> --
> Daryl S
>
>
> "Pendragon" wrote:
>
> > Access03
> >
> > Dim StartDate as Date
> >
> > I have a recordset which grabs a date-formatted field. StartDate is set to
> > this recordset field. In the immediate window, rsDetail("RevDate") properly
> > shows 1/31/2010; however, StartDate shows 12:00:00 AM.
> >
> > Can somebody explain why this would be the case?
> >
> > Thanks!

 
Reply With Quote
 
Pendragon
Guest
Posts: n/a
 
      15th Feb 2010
Problem resolved. I ran a couple tests in passing the recordset date into a
string and then using CDate to reset back into a Date variable. This works.

StartDate = CDate(rsDetail("RevDate"))

I'd still like to know why data set as a date being passed to a variable set
as a date would not properly run as a date and instead simply have a value of
midnight.

"Daryl S" wrote:

> Pendragon -
>
> It looks like the control is formated as Time - change the format to the
> Date format you want to see.
>
> --
> Daryl S
>
>
> "Pendragon" wrote:
>
> > Access03
> >
> > Dim StartDate as Date
> >
> > I have a recordset which grabs a date-formatted field. StartDate is set to
> > this recordset field. In the immediate window, rsDetail("RevDate") properly
> > shows 1/31/2010; however, StartDate shows 12:00:00 AM.
> >
> > Can somebody explain why this would be the case?
> >
> > Thanks!

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Symbols are not appearing properly =?Utf-8?B?TGluZGE=?= Microsoft Word Document Management 3 13th Sep 2007 09:14 PM
icons not appearing properly warren Windows XP General 0 26th May 2007 01:26 PM
icons not appearing properly warren Windows XP Basics 0 26th May 2007 01:25 PM
ActiveX not appearing properly babu_4uin@yahoo.co.in Windows XP Internet Explorer 0 11th Jun 2006 08:38 AM
Figure is not appearing properly =?Utf-8?B?QWtoaWxlc2ggRGFsaWE=?= Microsoft Excel Misc 5 26th May 2005 11:09 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 01:22 PM.