-
Dates from VB into SQL
Hi
I have a table which contains a date field....when the fields data
type is set to date/time the format changes to MM/DD/YYYY but
yet when the datatype is set to char the format is perfect......
Why does this happen?.....I'm using a SQL stmt in my VB app to
update the field......
Thanks
:p ;) ;)
-
because of regional settings i guess
-
Peet
Thanks for replying but the date regional settings are set to
'dd-mm-yyyy'...??
Thanks
Has anyone any suggestions?
-
oh...
well I do not know why then :)
I do not know the date fields too good... reason being I NEVER use them.... Use text fields :)
-
It's not the regional settings where you think - it's inside the database engine that matters... and they are all american ('mm-dd-yyyy') by default.
the way around it is to always send dates to databases in this format: "DD MMM YYYY"
..so there can be no confusion about which part of the date is which. ;)
-
Si..Thanks for replying
so instead of trying to send/format the date as DD-MM-YYYY use
DD-MMM-YYYY - ????
Thanks
-
yep.. "DD MMM YYYY" works for all database systems I have tried it on :)
-
mmm I gave up dates a looooong time ago :D
all dates saved as YYYYMMDD in text fields.. :blush:
-
noooooo!! :eek:
oh well, I definitely wouldnt recommend it, but it's up to you :D
-
heheeh yeahh... thats the beuty of it... :D its all up to me... the evil progger :D
-
Hey Si.....:D it works a treat....Thanks very much!!! :p :p