string CDatabase::DateToCharFunction( string value, string type = "FULL", string site = false )
The method DateToCharFunction returns the string DATE_FORMAT
for MySQL or TO_CHAR
for Oracle, with all the required parameters.
The date format is specified in either language or site preferences.
Parameter | Description |
---|---|
value | Date in the format of a current site. |
type | Type of the date format: "FULL" - date and time, "SHORT" - date only. Optional; "FULL" by default. |
site | Site ID for the public section or language ID for administrative section. Optional; the current ID is used by default. |
<? $strSql = " SELECT ID, ".$DB->DateToCharFunction("DATE_CREATE")." DATE_CREATE FROM my_table "; $rs = $DB->Query($strSql, false, $err_mess.__LINE__); ?>
© 2001-2005 Bitrix | Bitrix Site Manager - Content Management & Portal Solutions |