Thanks David 

It was

regards

Andries

--- "Smith David G (Finance)" <[EMAIL PROTECTED]> wrote:

> I think this will do it:
> 
> T: TDateTime;
> 
> Round( T * 12) / 12;  // Round to 2 hours
> Round( T * 6) / 6;            // Round to 4 hours
> 
> 
> David
> 
> -----Original Message-----
> From: [email protected] [mailto:[EMAIL PROTECTED] On
> Behalf Of Andries Bos
> Sent: Thursday, November 03, 2005 9:19 AM
> To: delphi advanced group
> Subject: [delphi-en] rounding hours
> 
> Hello
> 
> I'm looking for a function to round an TDateTime  to
> a) 2 and
> b) 4 hours; 
> 
> e.g. if its 15h10 it should round to 16h00 when using the 2-hours
> rouding. 
> and at 4 hours interval it should be rounded to the nearest 24/4 hour. 
> 
> any ideas?
> 
> regards
> 
> andries
> 
> 
>               
> __________________________________
> Yahoo! FareChase: Search multiple travel sites in one click.
> http://farechase.yahoo.com
> 
> 
> 
> -----------------------------------------------------
> Home page: http://groups.yahoo.com/group/delphi-en/
> To unsubscribe: [EMAIL PROTECTED] 
> Yahoo! Groups Links
> 
> 
> 
>  
> 
> 



        
                
__________________________________ 
Yahoo! Mail - PC Magazine Editors' Choice 2005 
http://mail.yahoo.com


------------------------ Yahoo! Groups Sponsor --------------------~--> 
Get Bzzzy! (real tools to help you find a job). Welcome to the Sweet Life.
http://us.click.yahoo.com/A77XvD/vlQLAA/TtwFAA/i7folB/TM
--------------------------------------------------------------------~-> 

-----------------------------------------------------
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/
 


Reply via email to