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?
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?
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.
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
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
ASKER
My regional settings are set to english NZ which is the same as English UK
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.