DateToCharFunction
string CDatabase::DateToCharFunction( string value, string type = "FULL", string lang = false string SearchInSitesOnly =false )
Returns DATE_FORMAT string for MySQL, and TO_CHAR string for Oracle, with all the required parameters.
The date formats are specified in the Local settings of site. Non-static method.
Parameters
Parameter | Description | Available from version |
---|---|---|
value | Data value in the format of a current site. | |
type | Type of the date format: "FULL" - date and time, "SHORT" - date only (without time)
Optional. "FULL" by default. | |
lang | Language ID for administrative section. Optional. Current ID is specified by default. Unavailable in versions from 3.0.11 to 3.3.21. | |
SearchInSitesOnly | Optional. |
See Also
Examples of use
<? $strSql = " SEL ECT ID, ".$DB->DateToCharFunction("DATE_CREATE")." DATE_CREATE FR OM my_table "; $rs = $DB->Query($strSql, false, $err_mess.__LINE__); ?>
© «Bitrix24», 2001-2024