DateToString - cDRReport¶
Methods - Properties - Events
Method Type¶
Function
Return Type¶
Arguments¶
| Argument | Description |
|---|---|
dIn |
Date value to be formatted as string. |
Description¶
This function can be used to format a Date variable as a string in a YYYY-MM-DD format often used by SQL servers.
Starting with version 5.0.1, the function is re-directed to a child object based on the cDRReportHelper class.
DataFlex Framework usage¶
- Web
- Windows
- FlexTron
Sample¶
Object oReport is a cDRReport
Set psReportName to 'MyReport.dr'
End_Object
Object oRunReportButton is a Button
Set Label to 'Run Report'
Procedure DefineBeginningDate String sReportId String sValue
Integer iParameter
If (sReportId <> '' and sValue <> '') Begin
Get DateToString of oReport sValue to sValue
Get ParameterIdByName of oReport sReportId "Beginning_Date" to iParameter
Set psParameterValue of oReport sReportId iParameter to sValue
End
End_Procedure
Procedure OnClick
String sReportId sFromBeginningDate
Get OpenReport of oReport to sReportId
If (sReportId <> '') Begin
Get Value of oBeginningDate to sFromBeginningDate
Send DefineBeginningDate sReportId sFromBeginningDate
Send DisplayReport of oReport
End
End_Procedure
End_Object