Skip to content

cDateISO::AsSQL()

Rainer Stötter edited this page May 9, 2017 · 1 revision

Method AsSQL( )

 public   string libdatephp\cDate::AsSQL()

AsSQL() returns the SQL representation of the date

Example:

$dt = new \libdatephp\cDate( 1, 1, 2017 );

     for ( $i = 0; $i < 12; $i++ ) {
	$dt->GoFirstWeekOfMonthISO( );
	echo "\n The first week of the month " . $dt->Month( ) . ' in ' . $dt->Year( ) . ' starts on the ' . $dt->AsSQL( );
	echo '. The month has ' . $dt->WeeksOfMonth( ) . ' calendar weeks ';
	$dt->AddMonths( );
     }

Returns

string the SQL string

See also

Clone this wiki locally