My
guess is that MS SQL Server is expecting the date in a different format. As an
experiment, try variations of breaking it up into different month, day, and
year for different inserts by rotating the elements such as:
@@monthvariable/@@datevariable/@@yearvariable
@@datevariable/@@yearvariable/@@monthvariable
@@yearvariable/@@monthvariable/@@datevariable
etc.
until you find the combination that works. For your test, I'd also choose unique
values (you had 02 for both month and two digit year) just so you can be sure
where each element is going. Then, once you've found the right
combination, use the FORMAT attribute to send your data
across:
<@VAR DatefromForm
FORMAT="datetime:%m/%d/%Y">
Hope
this helps,
Steve Smith
Skadt Information Solutions
Office: (519) 624-4388
GTA: (416) 606-3885
Fax: (519) 624-3353
Cell: (416) 606-3885
Email: [EMAIL PROTECTED]
Web: http://www.skadt.com
-----Original Message-----Hi,
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Vicky Bagwalla
Sent: June 7, 2002 9:06 AM
To: Multiple recipients of list witango-talk
Subject: Witango-Talk: Date issues
I am trying to write a date : 25/02/2002 (25-Feb-2002) to an SQL 7.0 database. For some reason, the date gets stored in the database as : 25/01/2000. I tried using the <Format datetime:%d/%m/%Y> tag but no use. Here are some more details:
- SQL datatype is datetime
- SQL 7.0
- SQL username that is used for the DSN has default language set up as BRITISH English
- I changed datatype of the SQL column to varchar (20). No use. Still defaults month to Jan and Year to 2000
- Tried inserting as <@ARG DatefromForm> into insert statement. No use.
- Tried storing it to variable @@DateFromForm. No use.
- Tried breaking up day month and year in different field variables. Like day, month and year and then storing them together in the insert action. No use. Still defaults month to Jan and Year to 2000
Any suggestions would be welcome and highly appreciated.
Thanks
- Vicky
