RE: date format
From: R. Thomas, aka Xtreme.Net (removemeXtremeDotNet_at_hotmail.com.NoSpam)
Date: 01/20/05
- Next message: Rajat Tandon: ""Restructure a Windows application" from scratch in 2 months"
- Previous message: Anibal: "Relations in a three-thier app."
- In reply to: Abbott: "RE: date format"
- Next in thread: Abbott: "RE: date format"
- Reply: Abbott: "RE: date format"
- Messages sorted by: [ date ] [ thread ]
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"
> > > > >
- Next message: Rajat Tandon: ""Restructure a Windows application" from scratch in 2 months"
- Previous message: Anibal: "Relations in a three-thier app."
- In reply to: Abbott: "RE: date format"
- Next in thread: Abbott: "RE: date format"
- Reply: Abbott: "RE: date format"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|