473,320 Members | 1,952 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Inserting date issue

I’ve finally made the jump from Access to SQL Express but I’m having some difficulty inserting a date using an asp/vbscript page.

I’ve trawled the web and persisted with trial and error and basically I’m down to 2 outcomes.

The first…

Formatting the date before insert, all combination of day month and year using / or - as a separator. The insert works but shows in the table as either 01/01/1900 or some other crazy combination.

The second…

Formatting the date as yyyymmdd as recommended up and down the web produces this error

Microsoft OLE DB Provider for ODBC Drivers (0x80040E57)
[Microsoft][SQL Native Client][SQL Server]Arithmetic overflow error converting expression to data type datetime.

I’m very new to SQL so I could be wrong but I’m starting to think this is a SQL configuration issue.

The SQL column is set to datetime
The user language (user defined in the connection string) is set to British English although I’ve tried plain English too.

Any ideas welcome.
Aug 16 '07 #1
1 1282
jhardman
3,406 Expert 2GB
You're right, I think this is a configuration problem. I've been able to insert dates in just about any format. have you tried an unformatted system date like date()?

Jared
Aug 17 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: dthmtlgod | last post by:
I am trying to insert a date into a date field through my website. The date is pre-populated with todays date. I am getting a type mismatch error. The Access DB is setup as a Date/Time Short...
2
by: avinash | last post by:
hello myself avinash i am developing on application having vb 6 as front end and sql server 7 as back end. when i use insert query to insert data in table then the date value of that query is...
3
by: J. Muenchbourg | last post by:
while inserting new records into SQL, i'm using the folloinwg sqlstatement> Dim MySQL as string = "Insert into roster (pname, pnotes, thedate) values (@pname, @pnotes, @thedate)" the sql...
15
by: Khurram | last post by:
I have a problem while inserting time value in the datetime Field. I want to Insert only time value in this format (08:15:39) into the SQL Date time Field. I tried to many ways, I can extract...
0
by: Philip Dennis | last post by:
Dim idate As Date Dim DbDate As Date I have these defined on an application that reads a flat file to update a Sql 2005 Beta 2 database. The first record of the file always will contain a...
3
by: gazelle04 | last post by:
I'm trying to enter the current date into the table through code but there's an error in inserting the date. Whats wrong with this code: strSQL = "INSERT INTO University (, , )" strSQL =...
3
by: microjack | last post by:
I’ve finally made the jump from Access to SQL Express but I’m having some difficulty inserting a date using an asp/vbscript page. I’ve trawled the web and persisted with trial and error and...
1
by: Rehana | last post by:
I am having problem,while inserting date using insert query...In front end am using c#.net and my database is in ms-access.. if am pass date in dd/mm/yy format in insert query..it store as mm/dd/yy...
10
by: Cainnech | last post by:
Hello, I'm trying to insert a date into a database but it doesn't want to go in in the right format. I want to insert the date 01/02/2011 (dd/mm/yyyy). I added a response.write to the page to...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.