RE: date format

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: R. Thomas, aka Xtreme.Net (removemeXtremeDotNet_at_hotmail.com.NoSpam)
Date: 01/20/05


Date: Wed, 19 Jan 2005 17:19:01 -0800

How are u retrieving it in the first place that you get the wrong format?
R. Thomas

"Abbott" wrote:

> I would like to retrieve it like that. But... how? It appears to me, that
> whatever is retrieved, is formatted like the user's Regional Short Date
> Format. So how would I do this??
>
> Thanks a bunch!
> Brian
>
>
> "R. Thomas, aka Xtreme.Net" wrote:
>
> > In case, you have to make sure then when you retrieve the date, you should
> > retrieve it as dd/MM/yyyy instead of dd/MM/yy.
> > HTHs...
> > R. Thomas
> >
> > "Abbott" wrote:
> >
> > > > First you say that the user's format is MM/dd/yy, then how does the user
> > > > know in the first place if its 1964 or 2964?
> > >
> > > I always format the dates as MM/dd/yyyy when displaying them in grids,
> > > textboxes, etc.
> > >
> > > > Second, what application caters for year 2900?
> > >
> > > Well <g> this one happens to be a typo - it should be 1964. But it caused me
> > > to realize that the Datatable doesn't have century information which is a
> > > problem.
> > > Consider if a date of birth is entered as 01/01/1910. This would be stored
> > > in Access as 01/01/1910 as it should. But, if the users Regional Short Date
> > > Format is "MM/dd/yy", when I retrieve the records, the Datatable would have
> > > 01/01/10, and if it is formated as in MyDate.Tostring("MM/dd/yyyy"), it will
> > > be 01/01/2010. Wrong!
> > >
> > > Thanks for your help!
> > > Brian
> > >
> > > "R. Thomas, aka Xtreme.Net" wrote:
> > >
> > > > Hi,
> > > > First you say that the user's format is MM/dd/yy, then how does the user
> > > > know in the first place if its 1964 or 2964?
> > > > If there is a place from wher user knows that, you can utilize the same
> > > > thing to get ur data,
> > > > Second, what application caters for year 2900?
> > > > HTH..
> > > > R. Thomas
> > > >
> > > > "Stormy13" wrote:
> > > >
> > > > > I have a user whose Regional Short Date Format is "MM/dd/yy"
> > > > > When I fill a DataTable with the values from an Access table, the Date
> > > > > columns will contain the date like ""04/26/67 12:00:00 AM"
> > > > > I need to display the dates to the user as MM/dd/yyyy so I format it like
> > > > > cdate(ds.tables(0).rows(0).item("birthdate").tostring).ToString("MM/dd/yyyy")
> > > > >
> > > > > The problem is that since the century is not in the column's value, years
> > > > > like 2964 will be formatted as 1964.
> > > > >
> > > > > So... I think my question would be
> > > > > How do I get the century information into a datatable when the user's
> > > > > Regional Short Date Format is "MM/dd/yy"
> > > > >



Relevant Pages

  • RE: Problem displaying Currency on form
    ... Ensure that the CustPrice text box Format Property is set to "Currency." ... Change the VBA code assigning the value to the text box so that it's ... > which I am retrieving and displaying on a form. ...
    (microsoft.public.access.forms)
  • RE: Problem displaying Currency on form
    ... > Change the VBA code assigning the value to the text box so that it's ... > explicitly the Currency data type. ... >> I have currency fields set up on my table (with the correct Currency format) ... >> which I am retrieving and displaying on a form. ...
    (microsoft.public.access.forms)
  • Re: Telefonnummern und FAX-Nummern Format in Kontakten
    ... Thomas Steinbach wrote: ... Format angeben zu koennen, damit auch der FAX-Dienst ... IMHO ist das + ja fuer eine doppelte 0 ... Wer braucht heute noch Faxe?? ...
    (microsoft.public.de.windows.vista.bedienung)
  • Re: How to Change Date Format in a Database Results Region?
    ... think that "Rons' Hard Tutorial of the Month", recommended by Thomas Rowe, ... been able to get a customized date format working on my webpage. ... I don't really understand how the custom date/time function in Ron's ...
    (microsoft.public.frontpage.client)
  • Re: Report Data Not pulling in
    ... In what format? ... If by "pulling in" you simply mean retrieving from tables based on criteria, ... Larry Linson ...
    (microsoft.public.access.reports)