Sign in to follow this  
Followers 0
sigil

is there a script for addition and subtraction of time?

3 posts in this topic

I need to add and subtract minutes from a given time in military time format (e.g., 8:45 p.m. is 2045).

Let's say the function header looks like this:

func timeAdd($time,$minutes)

then timeAdd(2239,27) would return 2306.

Is there a script already out there for this? I couldn't find one in the scripts section, but perhaps I wasn't using the correct keyword to search for one.

Share this post


Link to post
Share on other sites



I need to add and subtract minutes from a given time in military time format (e.g., 8:45 p.m. is 2045).

Let's say the function header looks like this:

func timeAdd($time,$minutes)

then timeAdd(2239,27) would return 2306.

Is there a script already out there for this? I couldn't find one in the scripts section, but perhaps I wasn't using the correct keyword to search for one.

_dateAdd() will work when the the input is put in the correct format... :)

Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

Never mind; I just found the TimeToTicks function.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0