Dateformat Function; Considerations For Dateformat; Examples Of Dateformat - HP Neoview SQL Reference Manual

Hide thumbs Also See for Neoview SQL:
Table of Contents

Advertisement

DATEFORMAT Function

The DATEFORMAT function returns a datetime value as a character string literal in the DEFAULT,
USA, or EUROPEAN format. The data type of the result is CHAR.
DATEFORMAT is a Neoview SQL extension.
DATEFORMAT (datetime-expression,{DEFAULT | USA | EUROPEAN})
datetime-expression
is an expression that evaluates to a datetime value of type DATE, TIME, or TIMESTAMP.
See
"Datetime Value Expressions" (page
DEFAULT | USA | EUROPEAN
specifies a format for a datetime value. See

Considerations for DATEFORMAT

The DATEFORMAT function returns the datetime value in ISO8859-1 encoding on a Neoview
platform that has the ISO88591 or SJIS configuration. It returns the datetime value in UCS2
encoding on a Neoview platform that has the Unicode configuration. For more information on
the Neoview character set configurations, see the Neoview Character Sets Administrator's Guide.

Examples of DATEFORMAT

Convert a datetime literal in DEFAULT format to a string in USA format:
DATEFORMAT (TIMESTAMP '2008-06-20 14:20:20.00', USA)
The function returns this string literal:
'06/20/2008 02:20:20.00 PM'
Convert a datetime literal in DEFAULT format to a string in European format:
DATEFORMAT (TIMESTAMP '2008-06-20 14:20:20.00', EUROPEAN)
The function returns this string literal:
'20.06.2008 14.20.20.00'
257).
"Datetime Literals" (page
275).
DATEFORMAT Function
383

Advertisement

Table of Contents
loading

Table of Contents