Re: Access, ASP, DATE problems!



Thanks for the reply

Yes I am using the JET engine.

One of your links says

"In all versions of Access (including the 16-bit versions), JET SQL clauses
require dates in American format. To demonstrate this, enter any date in the
Criteria row under a date field in Query Design, and then switch to SQL
View. In Query Design view, you see the date according to your local
settings, but the SQL statement uses mm/dd/yy format."

My code is successfully submitting dates (they appear in Access as
xx-MMMM-YY, i.e. if the date is submitted as 1/8/05 then access reports it
as 1-AUG-05, which is correct) but when I read them back through code they
are wrong (i.e. 8-Jan-05). What do I use in my VB code to read them correct?



I am really confused by all this!





"RoyVidar" <roy_vidarNOSPAM@xxxxxxxx> wrote in message
news:mn.d0077d5776039455.33955@xxxxxxxxxxx
> Neil wrote in message <dc3n93$2vq$1@xxxxxxxxxxxxxxxxxxxx> :
>> I have been coding with ASP for some time now. I am using an ACCESS
>> database. I am in the UK and wish to use DD/MM/YYYY format for dates.
>>
>> I have had no end of problems and possible solutions to dates such as
>> 1/8/05
>> being interpreted in the wrong way.
>>
>> I have been given many suggestions (setting LCID, submitting dates in
>> long
>> format etc. etc.)
>>
>> Is there any definitive sloution or tutorial available? This is driving
>> me
>> MAD!
>>
>> I can get dates submitted OK but they get read back wrong. I alter the
>> code
>> and then they are submited wrong but read OK from the database.
>>
>> Someone please help!!!!!!!!!!!!!!!!
>>
>>
>> Neil
>
> Dates are stored as numbers, and displayed as dates. I'm assuming
> you are communicating with the Jet engine through dynamic sql, which
> is probably the only time this causes challenges, cause the Jet engine
> needs the string representation of the date in an unambiguous format
> to be able to determine whether 01/08/2005 is Aug 1 or Jan 8.
>
> You will find some more info/suggestions here
> http://allenbrowne.com/ser-36.html
> http://www.mvps.org/access/datetime/date0005.htm
>
> --
> Roy-Vidar
>


.



Relevant Pages

  • Re: Access, ASP, DATE problems!
    ... Neil wrote in message: ... I have been given many suggestions (setting LCID, submitting dates in long ... you are communicating with the Jet engine through dynamic sql, which is probably the only time this causes challenges, cause the Jet engine needs the string representation of the date in an unambiguous format ...
    (comp.databases.ms-access)
  • Re: Inserting regional settings specific data into sql server
    ... All EU countries withouth the two English speaking use the format dd-MM-yy ... By using the parameters, while the program is in the right culture setting, ... than all those formats results using SQLparameters in the way the SQL server ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: Inserting regional settings specific data into sql server
    ... Italianyou will observe that the settings used are 10/02/2006 ... it a better idea to Format it using the string format functions or a very ... into the sql database.Sorry to bug the shorts off you but u now have context ... By using the parameters, while the program is in the right culture setting, ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: Moving a VBA function to SQL server
    ... SQL is a set-based language. ... "String Functions " in Books Online. ... This will produce a job header formatted like this: ... The format he specifies is stored in table 'Settings' - field 'JobHdrMask' ...
    (comp.databases.ms-access)
  • Re: Prepare, SQL query with to_date call
    ... SQL query with to_date call ... The Oracle ODBC driver has a problem with date parameters although I'm ... using a date format containing the RR format. ...
    (perl.dbi.users)