By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
464,666 Members | 1,258 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 464,666 IT Pros & Developers. It's quick & easy.

select distinct date question

P: n/a
Hi to all.
How can I structure a select distinct date command that EXcludes the
time part of the datestamp. If I run a "select distinct date from
dbase" command I get all the records with different times(100's of
records) , I only want the distinct DATES , without associated
times.I'm working in VB.net
Hope I'm making sence.
Thanks
Rob

Nov 21 '05 #1
Share this Question
Share on Google+
4 Replies

P: n/a
On 20 Jul 2005 00:22:36 -0700, "seegoon" <se*******@yahoo.com> wrote:

I don't know against what kind of datasource you're running, but if
using MS-SQL take a look at the Substring method:

SELECT DISTINCT SUBSTRING(myDate,1,10) As ShortDate
FROM myTable

/Snedker
How can I structure a select distinct date command that EXcludes the
time part of the datestamp. If I run a "select distinct date from
dbase" command I get all the records with different times(100's of
records) , I only want the distinct DATES , without associated
times.I'm working in VB.net
Hope I'm making sence.
Thanks
Rob


Nov 21 '05 #2

P: n/a
Hi there.
It's a ms Access(.mdb) database.
Cheers
Rob

Nov 21 '05 #3

P: n/a
On 20 Jul 2005 02:07:00 -0700, "seegoon" <se*******@yahoo.com> wrote:

That would be

SELECT DISTINCT Left([myDate],10) AS ShortDate
FROM myTable

Though, you may have to select it into a temp table since Left is a
built-in Access function - not actual SQL-language.
Hi there.
It's a ms Access(.mdb) database.
Cheers
Rob


Nov 21 '05 #4

P: n/a
Thanks a bunch , got it working now
Thanks again
Rob

Nov 21 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.