Link to home
Start Free TrialLog in
Avatar of deNZity
deNZity

asked on

Is it possible to query database on date field using uk date format or do I use convert?

I would like to be able to write a query using uk date format

select * from xxx where datefield >= '01/04/2008'

also is there a way to get dates returned from query displayed in uk format or
do I have to use convert in select statement?
Avatar of dqmq
dqmq
Flag of United States of America image

That query looks fine.  The default display format of the query likely depends on your installation settings and/or query tool configuation. If you want to request a specific format, by all means convert it to a string of the dexired form.  
Avatar of deNZity
deNZity

ASKER

Thanks for the reply,
the following query returns 8 rows where it should only return the last 2 rows.

select * from XXXX
where TransactionDate >= '01/08/2008'


2008-02-08 00:00:00.000
2008-02-18 00:00:00.000
2008-03-28 00:00:00.000
2008-04-10 00:00:00.000
2008-05-02 00:00:00.000
2008-07-16 00:00:00.000
2008-08-01 00:00:00.000
2008-08-29 00:00:00.000
Avatar of deNZity

ASKER

My regional settings are set to english NZ which is the same as English UK
ASKER CERTIFIED SOLUTION
Avatar of dportas
dportas

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial