Drew Wutka
DWUTKA at marlow.com
Mon Mar 17 01:01:00 CST 2003
I know people are going to post about the DateDiff function. But I'd like to get you thinking about what you are actually trying to do. Dates and Times are stored as numbers. The date is the whole number, which represents the number of days since 12-30-1899. Thus, since days are whole numbers, you can add or subtract days by simple math. (ie, to get tomorrow, it's Date()+1). Times are the fraction of the day. ie, .5 is noon, and .0 is midnight. Thus, you can also just simply add or subtract values to change the time. (ie, to get an hour from now, use Now()+(1/24)). Does that make sense? Also, another little known fact about the Date, Time and Now functions. They work both ways. If you use this line of code: Date=Date()+1 You've just set your systems date to tomorrow! <grin> Drew -----Original Message----- From: Darren Dick [mailto:d.dick at uws.edu.au] Sent: Sunday, March 16, 2003 8:46 PM To: Access Mail Group Subject: [AccessD] A2K: This should be easy Hello all This should be simple. I have a control on a form (txtStartTime). Formatted for Short time (i.e. hh:mm) I want to take say...5, 10 or 15 minutes from whatever time is in txtStartTime So take away 15 from 11:00 should give me 10:45 How do I do this. <Sigh> this should be easy. It probably is, I'm just brain fading. Darren _______________________________________________ AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com