DATE - year - month - day / year - day - month

[expired user #8851]'s profile image [expired user #8851] posted 9 years ago in General Permalink
I tried to reshuffle the date but it always shows, "Conversion failed when converting date and/or time from character string"


I don't understand this.
ansgar's profile image ansgar posted 9 years ago Permalink
What means "reshuffle"? What SQL query are you exactly executing?
[expired user #8851]'s profile image [expired user #8851] posted 9 years ago Permalink
Example: 2015-12-15 to 2015-15-12

I'm not using query, just adding some rows. Sorry I'm not familiar with terms.
ansgar's profile image ansgar posted 9 years ago Permalink
Ok, you are adding some rows, using HeidiSQL's data grid, or how do you do that?

Please be more detailed, otherwise noone can help you here.
[expired user #8851]'s profile image [expired user #8851] posted 9 years ago Permalink

Ok, you are adding some rows, using HeidiSQL's data grid, or how do you do that?

Please be more detailed, otherwise noone can help you here.



Ok I have 2 test rows. Random date. But the 3rd row seems to have problem.
It allows date:
2015-11-11
2015-11-12
2015-12-12
Which I suspect that the middle number was basically the "month" and the last 2 digits was the "day"
But when I reach 2015-12-13, it pops and error.

So I thought that the middle digit number are "day" so I've tried;
2015-13-12 but still doesn't work.

Date must be December 15, 2015.
2 attachment(s):
  • ss1
  • ss2
ansgar's profile image ansgar posted 9 years ago Permalink
First, I see you are on a MSSQL server. It's important to report that when you ask for help here.

Then, you should post the UPDATE query which is leading to the error here. You can copy it from your SQL log panel at the very bottom of HeidiSQL.

I already see the UPDATE query in your screenshot, and it reveals that the used format for the date value is 'DD/MM/YYYY'.

This was a format in an older build, which I modified to make it work on more server versions.

So, please just update your HeidiSQL to the latest release and try again.
[expired user #8851]'s profile image [expired user #8851] posted 9 years ago Permalink

First, I see you are on a MSSQL server. It's important to report that when you ask for help here.

Then, you should post the UPDATE query which is leading to the error here. You can copy it from your SQL log panel at the very bottom of HeidiSQL.

I already see the UPDATE query in your screenshot, and it reveals that the used format for the date value is 'DD/MM/YYYY'.

This was a format in an older build, which I modified to make it work on more server versions.

So, please just update your HeidiSQL to the latest release and try again.



I see thank you. Didn't realize that. I have another question, I used to export data from MySQL to MS SQL and it shows that this error must be address to something but I don't know how.

/*!40000 ALTER TABLE "wineclienttable" DISABLE KEYS */
/* [database1] SQL Error (105): Incorrect syntax near the keyword 'INTO'
Unclosed quotation mark after the character string ')'. */

When exporting same table does it matter if number after the primary has been skipped? Example: My primary is of course starts with 1, followed with 5, 8, 9, 10, so on.
[expired user #8851]'s profile image [expired user #8851] posted 9 years ago Permalink

Ok, you are adding some rows, using HeidiSQL's data grid, or how do you do that?

Please be more detailed, otherwise noone can help you here.



I have other tool for SQL but I find this HeidiSQL bit more user-friendly and so easy to use. It's just there are commands that I'm not so familiar with.

Thanks for help me out. :)
ansgar's profile image ansgar posted 9 years ago Permalink
So, did that update fix your date problem?
[expired user #8851]'s profile image [expired user #8851] posted 9 years ago Permalink

So, did that update fix your date problem?



Yes! Thanks to you!

Please login to leave a reply, or register at first.