Was this page helpful?

Date.Parse

    Table of contents
    1. 1. Usage Restrictions
    2. 2. Parameters
    3. 3. Result
    4. 4. Samples
    date.Parse(text : str, format : str, culture : str?, timezone : str?) : str

    Parse a custom date-time string.

    Usage Restrictions

    9.02 or later.

    Parameters

    Name Type Description
    text str text to parse
    format str custom date formatting string  (optional, default: best effort)
    culture str? culture code (optional, default: page or site culture)
    timezone str? timezone offset to use, if none given in the date (optional, format: ±hh:mm, default: GMT)

    Result

    A standard date time string in short format in the GMT timezone.

    Samples

       Output

    Translate a custom format:

     

    Thu, 03 Feb 2000 13:15:00 GMT

    Translate to a custom format and shift timezones:

    {{ date.Parse{ text :"2000/02/03 13:15:00", format: "yyyy/MM/dd HH:mm:ss", timezone : "+09:00"} }}

    Thu, 03 Feb 2000 04:15:00 GMT

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

    Copyright © 2011 MindTouch, Inc. Powered by