473,466 Members | 1,347 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

select distinct date question

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
4 1759
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
Hi there.
It's a ms Access(.mdb) database.
Cheers
Rob

Nov 21 '05 #3
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
Thanks a bunch , got it working now
Thanks again
Rob

Nov 21 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Martin Feuersteiner | last post by:
Dear Group I'm having trouble with the clause below. I would like to select only records with a distinct TransactionDate but somehow it still lists duplicates. I need to select the...
1
by: Roberto Esposito | last post by:
HI to All.... i need an help for a Select Query MYSQL Version 3.23.58 it's all day i try to resolve this problem.... but i don't find SOLUTION! sigh :-( This is the simple query.....
3
by: Tcs | last post by:
My backend is DB2 on our AS/400. While I do HAVE DB2 PE for my PC, I haven't loaded it yet. I'm still using MS Access. And no, I don't believe this is an Access question. (But who knows? I...
9
by: Kelvin | last post by:
Okay so this is baking my noodle. I want to select all the attritbutes/fields from a table but then to excluded any row in which a single attributes data has been duplicated. I.E. Here's my...
2
by: b. hotting | last post by:
Hi, Which msAccess SQL guru can help my out here? i would like a list of sales(count) per day per customer end result, something like: distinct(date), customer, cnt(ItemsSold) 20/5/2005, c1,...
4
by: benoit | last post by:
I have created a Typed DataSet that renders about 150 records. I put these into a datagrid that obviously shows me 150 records. My problem is now only one column is different most of the time....
1
by: seegoon | last post by:
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...
1
by: new | last post by:
I am building an effective dated file that shows results to date. In part 1 of the select I I process a larges set of input and genrate records for each date in the processing period for which...
7
by: beary | last post by:
I'll try to explain the problem, but it may not make sense. I have a mysql table with columns like id,title,speaker,day,month,year, topic etc. At present, my syntax is select * from files order...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.