Hi All,
I seem to have a problem and would love a way around it.
In my program I have a field for date/time, i only insert the shortdate in this field.
now before I go on, I have control of what regional settings each system has so all short dates are setup for AUS even in the access database.
lets say we have sql code like this
if all setup correct it searches for example from 1/03/2013 till 16/03/2013, however will actually return ALL dates back.
in investigating I decided to run a access sql query using its builder, despite the settings and fields being set to AUS date formats its own sql code still searched US version, ie between 03/01/2013 and 03/16/2013
I tested this in VB.Net by setting my regional settings to US and it pulled the correct dates instead of all the dates....... what!
why would the sql string need US dates when the system and access store and use AUS version? I dont really wish to change as im in AUS and so is the people using the software.
any help or guidance is awesome
I seem to have a problem and would love a way around it.
In my program I have a field for date/time, i only insert the shortdate in this field.
now before I go on, I have control of what regional settings each system has so all short dates are setup for AUS even in the access database.
lets say we have sql code like this
Code:
sql = "SELECT transid, price FROM log WHERE dater >= #" & DateTimePicker1.Value.ToShortDateString & "# AND dater <= #" & DateTimePicker2.Value.ToShortDateString & "#"
in investigating I decided to run a access sql query using its builder, despite the settings and fields being set to AUS date formats its own sql code still searched US version, ie between 03/01/2013 and 03/16/2013
I tested this in VB.Net by setting my regional settings to US and it pulled the correct dates instead of all the dates....... what!
why would the sql string need US dates when the system and access store and use AUS version? I dont really wish to change as im in AUS and so is the people using the software.
any help or guidance is awesome