Subject |
D2109 - INSERT INTO for a literal date doesn't seem to recognise DD/MM/YY |
From |
BRUCE HEATH <sideshow@specsol.com.au> |
Date |
Sun, 02 Mar 2025 17:06:27 -0500 |
Newsgroups |
dbase.getting-started |
Hi,
I'm playing with dBase 2109 and noticed that INSERT INTO seems a bit flaky when loading DATE information.
I have a simple rountine that uses INSERT INTO (date_field) VALUES (date_string) and I'm trying to load a date in DD/MM/YY format. Both the Windows 10 system and the Dbase ini file have the date format set to DD/MM/YY
e.g.
INSERT INTO (fd) VALUES ("27/12/59")
This prompts a :Database Engine Error : Type mismatch in expression" error.
if I change it to american format e.g.
INSERT INTO (fd) VALUES ("12/27/59") //so MM/DD/YY format
it goes through without a fault, but I'm wondering why the command fails.
It seems as though the command doesn't recognise either the system format or the dBase SET DATE format.
When I retrieve the data, however, it's in the "right" format (DD/MM/YY) even though the load in requires MM/DD/YY.
I'm very confused.
|
|