D
DC
Im having a rather annoying SQL related problem with SELECT statemnets
and UK dates
The entire application is globalised to culture="en-GB" and
uiCulture="en-GB", and the access database is displaying and accepting
dates in UK format.
For some reason the statement is selecting the records with a date
before rather than after dtCurrDate.
dtCurrDate is produced via DateTime.Now and appears to be returning the
correct current date in uk format.
"SELECT * From SeminarList WHERE SeminarDate > #" + dtCurrDate +"# ORDER
BY SeminarDate";
Produces a set of records where SeminarDate is before todays date. Is
there something else I need to change?
EG: today the SQL produced was
SELECT * From SeminarList WHERE SeminarDate > #01/07/2005 00:00:00#
ORDER BY SeminarDate
and yet the diplay returns
Next Seminar - MSc dissertation presentations 2005
On 28/06/2005 at 11:30 in Sutcliffe Lecture Theatre (GU01)
Which obviously happened last week, is this a simple consequence of SQL
being inherantly US date formatted? Is there anything I can do about it?
--
_______________________________________________
DC
"You can not reason a man out of a position he did not reach through reason"
"Don't use a big word where a diminutive one will suffice."
"A man with a watch knows what time it is. A man with two watches is
never sure." Segal's Law
and UK dates
The entire application is globalised to culture="en-GB" and
uiCulture="en-GB", and the access database is displaying and accepting
dates in UK format.
For some reason the statement is selecting the records with a date
before rather than after dtCurrDate.
dtCurrDate is produced via DateTime.Now and appears to be returning the
correct current date in uk format.
"SELECT * From SeminarList WHERE SeminarDate > #" + dtCurrDate +"# ORDER
BY SeminarDate";
Produces a set of records where SeminarDate is before todays date. Is
there something else I need to change?
EG: today the SQL produced was
SELECT * From SeminarList WHERE SeminarDate > #01/07/2005 00:00:00#
ORDER BY SeminarDate
and yet the diplay returns
Next Seminar - MSc dissertation presentations 2005
On 28/06/2005 at 11:30 in Sutcliffe Lecture Theatre (GU01)
Which obviously happened last week, is this a simple consequence of SQL
being inherantly US date formatted? Is there anything I can do about it?
--
_______________________________________________
DC
"You can not reason a man out of a position he did not reach through reason"
"Don't use a big word where a diminutive one will suffice."
"A man with a watch knows what time it is. A man with two watches is
never sure." Segal's Law