Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 Other Forums
 MS Access
 CONVERT in Ms Access

Author  Topic 

darrengan
Starting Member

5 Posts

Posted - 2005-06-29 : 21:56:00
Dear Friends,

I have a field for storing date in the format of dd/mm/yyyy and the datatype is set as DateTime in Ms Access.

When i want to query a date range, i use the following scripts:

SELECT date FROM tbl WHERE date BETWEEN #20/06/2005# and #29/06/2005#

it manage to query correctly according to the date range but the date result format shows '2005-06-20 00:00:00'. I need to show it in 'dd/mm/yyyy'

I have tried:

SELECT convert(datetime,date,203) FROM tbl WHERE date BETWEEN #20/06/2005# and #29/06/2005#

but it seems that ms access does not support 'convert'

Any suggestion?

Cheers

Bee-Z
Starting Member

6 Posts

Posted - 2005-07-01 : 06:13:08
In Access you use the format property for those...so depending on where you want to see this field (report, form or directly in the query?) you can use it's format property
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2005-07-01 : 07:20:12
Did not you get answer from this topic?
http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=51708

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page
   

- Advertisement -