I'm trying to get an application to be able to use a given time and figure out how many seconds are left until that time. The time is anywhere from an hour to a week away. What do I use to do this?
60 seconds per minute
60 minutes per hour
24 hours per day
7 days per week
365.2525 days per year
HOWEVER, I recommend you use something like the Timestamp object. That stores any date in the number of seconds since the unix epoc (a date in the 1980's I think, Wikipedia will have it).
So, find the time and date you're starting from with the Timestamp's 'get today' expression, and the timestamp for the target date.