Sybernet / Supplied Functions Reference
Release 3.00
Oct 14, 2002
backwards forwards

HTTP.DATETIME

This function returns a valid date from a string. datetime recognizes three basic styles of date input. Each of the date formats shown below must be enclosed in quotes when it is used, and may be follwed by a time specification.

  • The month is entered in alphabetic format.

    - Month can be a 3-character abbreviation, or the full month name, as given in the specification for the current language.

    - Commas are optional.

    - Case is ignored.

    - If you specify only the last two digits of the year, values less than 50 are interpreted as "20yy", and values of 50 or greater are interpreted as "19yy".

    - You must type the century only when the day is imitted, or when you need a century other than the default, as described above.

    - If the day is missing, it defaults to the first day of the month.

    - Valid formats for specifying the date alphabetically are:

    Apr[il] [15][,] 1988
    Apr[il] 15[,] [19]88
    Apr[il] 1988 [15]
    
    [15] Apr[il][,] 1988
    15 Apr[il][,] [19]88
    15 [19]88 apr[il]
    [15] 1988 apr[il]
    
    1988 APR[IL] [15]
    [19]88 APR[IL] 15
    1988 [15] APR[IL]
    

  • The month is entered in numeric format, in a string with slash (/), hyphen (-) or period (.) separators.

    - The month, day, and year must be specified.

    - The strings must be in the form:

    <num> <sep> <num> <sep> <num> [ <time spec> ]
    

    - To enter "April 15, 1988" in mdy format, you can use these formats:

    [0]4/15/[19]88
    [0]4-15-[19]88
    [0]4.15.[19]88
    

    Syntax

    FUNCTION DATETIME
    (
        VALUE                         VARCHAR2
    )
    RETURN DATE;
    

    Parameters

    Parameter Description
    value
     
    A date string as described above.

    Returns

    A valid DATE or NULL if string is not a valid date string.

    Example

    The following example illustrates how to call datetime.

    select http.datetime('October 17, 2002') from dual;
    



    Sybernet is a trademark of SRI International.
    Copyright © 1996-2008 SRI International. All Rights Reserved.
    Denis D. Workman / http://Sybernet.sri.com/