The UK Home Automation Archive

Archive Home
Group Home
Search Archive


Advanced Search

The UKHA-ARCHIVE IS CEASING OPERATIONS 31 DEC 2024


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: ASP Question...


  • To: ukha_d@xxxxxxx
  • Subject: RE: ASP Question...
  • From: andy.powell@xxxxxxx
  • Date: Thu, 29 Mar 2001 17:00:47 +0200
  • Delivered-to: rich@xxxxxxx
  • Delivered-to: mailing list ukha_d@xxxxxxx
  • Mailing-list: list ukha_d@xxxxxxx; contact ukha_d-owner@xxxxxxx
  • Reply-to: ukha_d@xxxxxxx

Mark,

the trouble is I am searching for a TIME eg 1:35:33 PM which was written
ok to the DB. I suppose I could f&%g around as you said

select * from bobble where ttime<#1:35:34 PM# and ttime>#1:35:32
PM#

but it's a lot of tarting around with string manipulation to search on a
field... I'd probably be better off converting the field to a string
rather than a date/time


A.






Mark Harrison <Mark.Harrison@xxxxxxx>
29/03/2001 16:55
Please respond to ukha_d


To:     "'andy.powell@xxxxxxx '" <andy.powell@xxxxxxx>,
"'ukha_d@xxxxxxx '" <ukha_d@xxxxxxx>
cc:
Subject:        RE: [ukha_d] ASP Question...

This may be a red herring, since I'm not into VB, but "in the old
days"
you
always had to be careful about the "=" operator and time fields.

This is because programming languages used to represent time/date by
something like "seconds since midnight 1st January 1970" or
"10ths of
seconds since..."

As such, comparisons between times used to never come out right (until
they
got rounded for display, because the numbers were never really integers
when
it counted ;-)

The trick for "does it equal 6 minutes" used to be (in pidgin
SQL)

SELECT bibble from bobble where time > "5 minutes, 59 seconds"
AND time <
"6
minutes, 1 second."

Obviously, you need to substitute left, right and centre here, giving your
field names, and Keith's syntax for representation of time.

Hope this helps,

Mark Harrison
... who hasn't actually written real code for years, now, and boy it shows
;-)

-----Original Message-----
From: andy.powell@xxxxxxx
To: ukha_d@xxxxxxx
Sent: 29/03/2001 15:45
Subject: RE: [ukha_d] ASP Question...

Keith,

can you try = rather than > or <

Thanks

A.





"Keith Doxey" <ukha.diyha@xxxxxxx>
29/03/2001 16:41
Please respond to ukha_d


To:     <ukha_d@xxxxxxx>
cc:
Subject:        RE: [ukha_d] ASP Question...

Just tested it on my Jukebox and it works.....

SELECT TOP 20 Artist.ArtistID, SongID, ArtistFirstName, ArtistName,
ArtistLink, ArtistSuffix, SongTitle, SongDuration, SongMP3, SongCD FROM
Song
INNER JOIN Artist ON Song.ArtistID=Artist.ArtistID WHERE
Song.SongDuration
>
#00:06:00# ORDER BY SongTitle

List the first 20 songs where the duration is greater than 6 minutes.

Keith

-----Original Message-----
From: andy.powell@xxxxxxx [mailto:andy.powell@xxxxxxx]
Sent: 29 March 2001 15:19
To: ukha_d@xxxxxxx
Subject: [ukha_d] ASP Question...


Folks,

just a quickie re: ASP and Access...

How do I search for records matching a TIME (i.e. The field type is
date/time) ?? What's the SQL for it??

I've tried

Select * from MyTable where MYTIME='1:44:54'

but this gives an ODBC error 80040e21 - ODBC Driver does not support the
requested properties..


any clues???

Ta muchly

A.


************************ DISCLAIMER ************************
This message is intended only for use by the person
to whom it is addressed. It may contain information
that is privileged and confidential. Its content does
not constitute a formal commitment by Lombard Odier.
If you are not the intended recipient of this message,
kindly notify the sender immediately and destroy this
message. Thank You.
*****************************************************************







Your use of Yahoo! Groups is subject to
http://docs.yahoo.com/info/terms/







Your use of Yahoo! Groups is subject to
http://docs.yahoo.com/info/terms/









Your use of Yahoo! Groups is subject to
http://docs.yahoo.com/info/terms/



_____________________________________________________________________
This message has been checked for all known viruses by the
MessageLabs Virus Control Centre. For further information visit
http://www.messagelabs.com/stats.asp




Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/







Home | Main Index | Thread Index

Comments to the Webmaster are always welcomed, please use this contact form . Note that as this site is a mailing list archive, the Webmaster has no control over the contents of the messages. Comments about message content should be directed to the relevant mailing list.