Re: Insert query rearranges date value.

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



Hi Douglas,

Thanks for such a speedy reply. I must admit that is a terrible thing to
learn about MS. I suppose it is easy enough to get around it, but it really
is rather annoying that they design a product that will coax the rest of the
wolrd to it the USA way. Not very nice. Anyway, thanks for elucidating me
of this little oddity.

Cheers,

Jarryd

"Douglas J. Steele" <NOSPAM_djsteele@xxxxxxxxxxxxxxxxx> wrote in message
news:%23vdi0gPAGHA.272@xxxxxxxxxxxxxxxxxxxxxxx
> Sounds as though you have your short date format set to dd/mm/yyyy. Access
> will not respect that in SQL statements. It'll treat 15/10/2005 as 15 Oct
> 2005, since there is no 15th month, but regardless of what your short date
> format has been set to in Regional Settings, it's going to treate
> 12/10/2005 as 10 Dec 2005.
>
> Check out Allen Browne's "International Dates in Access" at
> http://allenbrowne.com/ser-36.html
> or what I have in my September 2003 Access Answers column for Pinnacle
> Publication's "Smart Access" newsletter. (The column and accompanying
> database can be downloaded at
> http://www.accessmvp.com/djsteele/SmartAccess.html)
>
> --
> Doug Steele, Microsoft Access MVP
> http://I.Am/DougSteele
> (no e-mails, please!)
>
>
>
> "Jarryd" <noemail@xxxxxxxxxxxx> wrote in message
> news:%23kSz$VPAGHA.912@xxxxxxxxxxxxxxxxxxxxxxx
>> Hi,
>>
>> I have the following append query that inserts a record based on some
>> variables, two those being dates. It works perfectly apart from one
>> thing: it swaps the days with the months when inserting the date values.
>> I have message boxed the values out and they are being read correctly, it
>> only muddles them up when it inserts them into the DB. However, it
>> doesn't swap them if it the days are greater than 12. For example,
>> 15/10/2005 inserts fine, but 12/10/2005 inserts as 10/12/2005:
>>
>> qrySplit = "INSERT INTO Order_Details ( Orders_Link, Quantity, Weight,
>> Width, Length, [X-Works_Del_Date], [Del_Date], SAP, IN_Completed )
>> VALUES(" & ordLink & "," & Quantity & "," & Weight & ", " & Wdth_U & ", "
>> & Len_U & ", #" & XW_U & "#, #" & D_Dt_U & "#, '" & S_U & "', " & In_comp
>> & ");"
>>
>> Any ideas as to what could be gonig wrong?
>>
>> TIA,
>>
>> Jarryd
>>
>
>


.