|
it
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Date problemI am in UK, running access 2000 + IIS4 + VISTA Ultimate in offline environment - i.e. webserver installed on my machine and not connected to internet, on a machine set up for UK. I have an access 2000 database field storing dates in medium date format 01-Oct-09 which is what I want. I access this field to populate a pulldown menu and it is displayed as UK format 01/10/09 which is not quite what I want but will do. I also access this field to populate a text box and it displays as US format 10/01/09 which is not at all what I want and not OK. What goes on??? Why dont these 2 form objects display in the same format as set up for the data base? Do I have to define date formats on each webpage? And if so, how do I do it? Help, please - how do I achieve consistency - must absolutely be able to trust dates. Thanks in advance Hugh hugh welford wrote:
> Hi, Dates are NOT stored with any format. They are stored (in Jet) as Doubles, > > I am in UK, running access 2000 + IIS4 + VISTA Ultimate in offline > environment - i.e. webserver installed on my machine and not > connected to internet, on a machine set up for UK. > > I have an access 2000 database field storing dates in medium date > format 01-Oct-09 which is what I want. with the whole number portion containing the number of days since the seed date, and the decimal portion containing the time of day. The Format property you set in the Access Table Design window is an Access-specific property that only controls how _Access_ will display the date values retrieved from that field. It has nothing to do with how the values are stored, and has no effect whatsoever on how other applications will display the date values retrieved from that field. > Dropdowns are implemented in IE using a Windows control, so your Regional > I access this field to populate a pulldown menu and it is displayed > as UK format 01/10/09 which is not quite what I want but will do. > settings are being used to format the date values. > I also access this field to populate a text box and it displays as US Values in text inputs are direct writes from Response, so the Regional > format 10/01/09 which is not at all what I want and not OK. > settings on the server are controlling the format (the default Regional setting for MS OS is US. > What goes on??? Why dont these 2 form objects display in the same Yes, you do need to format the values being retrieved from that field in the > format as set up for the data base? Do I have to define date formats > on each webpage? And if so, how do I do it? > format you want before writing them to Response. See: http://classicasp.aspfaq.com/date-time-routines-manipulation/can-i-make-vbscript-format-dates-for-me.html More info in these articles: http://classicasp.aspfaq.com/date-time-routines-manipulation/could-i-get-a-little-help-with-dates.html http://databases.aspfaq.com/general/can-i-fix-this-mm/dd/yyyy-dd/mm/yyyy-confusion-once-and-for-all.html -- Microsoft MVP - ASP/ASP.NET - 2004-2007 Please reply to the newsgroup. This email account is my spam trap so I don't check it very often. If you must reply off-line, then remove the "NO SPAM" Thanks bob.
Hugh Show quoteHide quote "Bob Barrows" <reb01501@NOyahoo.SPAMcom> wrote in message news:e4DwrayxJHA.5684@TK2MSFTNGP04.phx.gbl... > hugh welford wrote: >> Hi, >> >> I am in UK, running access 2000 + IIS4 + VISTA Ultimate in offline >> environment - i.e. webserver installed on my machine and not >> connected to internet, on a machine set up for UK. >> >> I have an access 2000 database field storing dates in medium date >> format 01-Oct-09 which is what I want. > > Dates are NOT stored with any format. They are stored (in Jet) as Doubles, > with the whole number portion containing the number of days since the seed > date, and the decimal portion containing the time of day. The Format > property you set in the Access Table Design window is an Access-specific > property that only controls how _Access_ will display the date values > retrieved from that field. It has nothing to do with how the values are > stored, and has no effect whatsoever on how other applications will > display the date values retrieved from that field. > >> >> I access this field to populate a pulldown menu and it is displayed >> as UK format 01/10/09 which is not quite what I want but will do. >> > > Dropdowns are implemented in IE using a Windows control, so your Regional > settings are being used to format the date values. > >> I also access this field to populate a text box and it displays as US >> format 10/01/09 which is not at all what I want and not OK. >> > > Values in text inputs are direct writes from Response, so the Regional > settings on the server are controlling the format (the default Regional > setting for MS OS is US. > >> What goes on??? Why dont these 2 form objects display in the same >> format as set up for the data base? Do I have to define date formats >> on each webpage? And if so, how do I do it? >> > > Yes, you do need to format the values being retrieved from that field in > the format you want before writing them to Response. See: > http://classicasp.aspfaq.com/date-time-routines-manipulation/can-i-make-vbscript-format-dates-for-me.html > > More info in these articles: > http://classicasp.aspfaq.com/date-time-routines-manipulation/could-i-get-a-little-help-with-dates.html > http://databases.aspfaq.com/general/can-i-fix-this-mm/dd/yyyy-dd/mm/yyyy-confusion-once-and-for-all.html > > -- > Microsoft MVP - ASP/ASP.NET - 2004-2007 > Please reply to the newsgroup. This email account is my spam trap so I > don't check it very often. If you must reply off-line, then remove the > "NO SPAM" >
Other interesting topics
From an ASP page, is there a way write to an EXCEL file without having EXCEL installed on the IIS ma
shorten the page address Listing Fields - advice needed truncated form POST Re: server side redirect https => http STILL NOT working ASP (not asp.net) type mismatch ignore style Sorting like Amazon DVD system History.go with asp. |
|||||||||||||||||||||||