Select min(InTime) from Table1 where (InTime > 13:00:00) the function Min works with characters too....
Vahan -----Original Message----- From: [email protected] [mailto:[EMAIL PROTECTED] Behalf Of soonhuat ong Sent: Tuesday, June 28, 2005 8:12 AM To: [email protected] Subject: [delphi-en] How to get nearest time from table In Table1, i have 'InTime' field, which is type character(8). The following are the sample records in the table. InTime ------ 11:00:13 12:10:15 12:13:32 12:54:12 13:06:02 13:08:08 15:06:12 Now, i want to execute a query to select from Table1 where InTime is less than basetime (assume basetime = 13:00:00) and nearest to basetime. How am i going to do so cos InTime is type of character. Hope someone can help. Thanks. --------------------------------- Yahoo! Sports Rekindle the Rivalries. Sign up for Fantasy Football [Non-text portions of this message have been removed] ----------------------------------------------------- Home page: http://groups.yahoo.com/group/delphi-en/ To unsubscribe: [EMAIL PROTECTED] ---------------------------------------------------------------------------- ---- YAHOO! GROUPS LINKS a.. Visit your group "delphi-en" on the web. b.. To unsubscribe from this group, send an email to: [EMAIL PROTECTED] c.. Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. ---------------------------------------------------------------------------- ---- [Non-text portions of this message have been removed] ----------------------------------------------------- Home page: http://groups.yahoo.com/group/delphi-en/ To unsubscribe: [EMAIL PROTECTED] Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/delphi-en/ <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/

