Was this page helpful?

Date.AddSeconds

    Table of contents
    1. 1. Usage Restrictions
    2. 2. Parameters
    3. 3. Result
    4. 4. Samples
    date.AddSeconds(datetime : str, seconds : num) : str

    Adds the specified number of seconds to a date and returns the result.  The number of seconds can be positive or negative. 

    Usage Restrictions

    1.9.1 or later.

    Parameters

    Name Type Description
    datetime
    str The date to which to add seconds.
    seconds
    num
    The number of seconds to add.

    Result

    A new date.

    Samples


    Output

    To subtract 5 seconds from the current date:

    {{ date.AddSeconds(date.now, -5) }} 

    Sun, 19 May 2013 05:21:51 GMT

    To add 5 seconds to a constant date:

    {{ date.AddSeconds("01/01/2000", 5) }} 

    Sat, 01 Jan 2000 00:00:05 GMT

    Was this page helpful?
    Tag page
    You must login to post a comment.

    Copyright © 2011 MindTouch, Inc. Powered by