ASP.NET - Error with dates: 37/10/aaaa - dd/mm/yyyy --> dd/mm/aaaa in spanish

ASP.NET - Error with dates: 37/10/aaaa - dd/mm/yyyy --> dd/mm/aaaa in spanish

Post by jord » Wed, 30 Apr 2003 23:23:28



I have a problem getting dates from any data source (Ms. Access or SQL
Server) with the spanish ASP.NET (Framework v1.0.3705)

for instance, this is the content of a dataset (Ms Access 2000):
2001      2629    200          37/10/aaaa 18:37:00           2
2002      2754      75          1/11/aaaa 19:01:00             2

It does the same with SQL Server 2000

I have found the same problem with many other websites (look at the dates)
so it seem to be a very common problem in spanish systems:
http://www.cfnti.net/telecentros/ditic/calendario.asp
http://www.fible.com/
http://www.webeo.cl/foros/forum.asp?forumid=7&recordnum=20
http://www.anarquia.cl/foros/forum.asp?forumid=39
http://www.voluntariado.net/catalan/scripts/volunt_mens.asp?IdCat=2&C...
tactar'
http://www.tormo.com/resumen/index.asp?offset=10

I must be a versions problem, take a look at:
http://support.microsoft.com/default.aspx?scid=kb;es;551173
It explains the same problem with Microsoft word.

I suppose that it is a parsing problem, in spanish the date format is
DD/MM/AAAA but it will be trying to parse with DD/MM/YYYY

I have one server working right and another with this problem.

Both have the same regional settings (where you can setup the short and long
date it uses the aaaa)
And Both are updated with the last versions of everything (SP3 of win2000,
SP3 of sql2000, ...)

Help me please !!!!!

 
 
 

ASP.NET - Error with dates: 37/10/aaaa - dd/mm/yyyy --> dd/mm/aaaa in spanish

Post by Luis Ange » Wed, 30 Apr 2003 23:55:51


Hi Jordi,

    I'm having the same problem in my machine, but not in my production
servers, so I think it's due to some program that I've sometime installed (a
lot of them I thing)

    Teorically IIS takes the default language ID (HKEY_USERS\.Default) and
uses it for formating the dates, but in my machine it's not working well
(response.write Session.LCID returns 0).

    The solution I've found is to initialize LCID in the global.asa file.
Try this:

            Session.LCID = 3082     <--- 3082 is spanish configuration. At
MSDN you could find more codes.

    If you find a solution that works for solving this, please reply it to
this newsgroup, because I've looked through MSDN KB but no related article
helped me.

    Hope this helps,

--

Luis Angel R.C.
MCP - VB - VB.NET



Quote:> I have a problem getting dates from any data source (Ms. Access or SQL
> Server) with the spanish ASP.NET (Framework v1.0.3705)

> for instance, this is the content of a dataset (Ms Access 2000):
> 2001      2629    200          37/10/aaaa 18:37:00           2
> 2002      2754      75          1/11/aaaa 19:01:00             2

> It does the same with SQL Server 2000

> I have found the same problem with many other websites (look at the dates)
> so it seem to be a very common problem in spanish systems:
> http://www.cfnti.net/telecentros/ditic/calendario.asp
> http://www.fible.com/
> http://www.webeo.cl/foros/forum.asp?forumid=7&recordnum=20
> http://www.anarquia.cl/foros/forum.asp?forumid=39

http://www.voluntariado.net/catalan/scripts/volunt_mens.asp?IdCat=2&C...

- Show quoted text -

Quote:> tactar'
> http://www.tormo.com/resumen/index.asp?offset=10

> I must be a versions problem, take a look at:
> http://support.microsoft.com/default.aspx?scid=kb;es;551173
> It explains the same problem with Microsoft word.

> I suppose that it is a parsing problem, in spanish the date format is
> DD/MM/AAAA but it will be trying to parse with DD/MM/YYYY

> I have one server working right and another with this problem.

> Both have the same regional settings (where you can setup the short and
long
> date it uses the aaaa)
> And Both are updated with the last versions of everything (SP3 of win2000,
> SP3 of sql2000, ...)

> Help me please !!!!!


 
 
 

1. Date, changing mm/dd/yy to dd/mm/yy

I need to change the International settings in Visual Interdev to
English(Ireland) or English(UK).
There are only 2 options available:
English(United States) and
Same as Microsoft Office, which is set to English(Ireland), but Interdev
sees it as English(United STates) for some reason.

Help!  

2. Internet connection sharing - Error 783

3. ASP.NET , saving DD/MM/YYYY format dates to Access/SQl database

4. Stubify Problem

5. date validation "dd-mm-yyyy" ???

6. Q: Anyone tried AXON For Bass ?

7. ISO 8601 yyyy-mm-dd format validation

8. How to call Stored Procedure from Client Side Code using jQuery

9. Validating dd/MM/yyyy text boxes

10. DateTime.Now to yyyy-mm-dd

11. sort on a dt field - need yyyy/mm/dd format?

12. How to parse yyyy/MM/dd datetime ?

13. How do i get the weeknumber from a date (dd/mm/yy)?