Open furicle opened 9 months ago
The value that's being shown is a naive string representation of a Buffer
object. If you were to do:
> a = Buffer.from([50, 48, 50, 52, 45, 49, 50, 45, 51, 49])
<Buffer 32 30 32 34 2d 31 32 2d 33 31>
> a.toString()
'2024-12-31'
Can see that the value within the buffer is as you'd expect, it's just now a matter of figuring out why it's being returned as a buffer, as well as figuring out best way to get it to the appropriate string type before displaying it to the user.
What version of MySQL are you using?
Let me see - that one was (don't laugh)
mysql-5.1.73-8.el6_8.x86_64
sqlectron 1.38.0 Windows 10 Pro 64 bit Interacting with an older MySQL server
If I run this query in sqlectron, I get odd results.
select concat_ws("-",year(curdate())-2,"12","31");
sqlectron shows
50,48,50,52,45,49,50,45,51,49
Running the same query from a terminal on the mysql server...