General Introduction
Features
Settings
Email system
Date and Time
URL rewrite
Special constants
Special variables
Complex logic in filter
CharToDateFunction
Commit
CompareDates
Connect
CurrentDateFunction
CurrentTimeFunction
DateFormatToPHP
DateToCharFunction
DatetimeToTimestampFunction
Disconnect
ForSql
FormatDate
InitTableVarsForEdit
Insert
IsDate
LastID
NextID
ParseSqlBatch
PrepareFields
PrepareInsert
PrepareUpdate
Query
QueryBind
QueryBindSelect
Rollback
RunSqlBatch
StartTransaction
Update
CurrentDateFunction
string CDatabase::CurrentDateFunction()
The method returns SQL function that is used to return the current date. Specifically: "CURRENT_DATE" for MySQL and "TRUNC(SYSDATE)" for Oracle. Non-static method.
Parameters
No parameters.
See Also
Examples of use
<? $strSql = "UPD ATE my_table SE T DATE_CHANGE=".$DB->CurrentDateFunction()." WHERE ID=45"; $Query($strSql, false, "FILE: ".__FILE__."<br>LINE: ".__LINE__); ?>
<? $strSql = " SEL ECT ID FR OM my_table WHERE DATE_CREATE <= ".$DB->CurrentDateFunction()." "; $rs = $DB->Query($strSql, false, $err_mess.__LINE__); ?>
© «Bitrix24», 2001-2023
Up