PHPマニュアル/PEARマニュアル | ユーザフォーラムで議論/質問 | マニュアル検索 | ハイライト | ハイライトオフ | ポータル | php spot

MongoDate::toDateTime - Returns a DateTime object representing this date | JavaScript入門&応用&リファレンスなら「JavaScriptist」

  

MongoDate::toDateTime

(PECL mongo >= 1.6.0)

MongoDate::toDateTimeReturns a DateTime object representing this date

説明

public DateTime MongoDate::toDateTime ( void )

Returns a DateTime object representation of this date.

パラメータ

この関数にはパラメータはありません。

返り値

This date as a DateTime object.

例1 MongoDate::toDateTime() example

This example demonstrates creating a DateTime object from a MongoDate object.

<?php
$d 
= new MongoDate(strtotime("2014-11-18 11:01:25"));
var_dump$d->toDateTime() );
?>

上の例の出力は、 たとえば以下のようになります。

class DateTime#2 (3) {
  public $date =>
  string(26) "2014-11-18 11:01:25.000000"
  public $timezone_type =>
  int(1)
  public $timezone =>
  string(6) "+00:00"
}

忘却曲線を使ってこの知識を確実に記憶に残す

フォーラムで「MongoDate::toDateTime - Returns a DateTime object representing this date」について話す
各種マニュアル: PHPマニュアル | PEARマニュアル | Smarty(英語)マニュアル | PHP-GTKマニュアル | MongoDate::toDateTime - Returns a DateTime object representing this date」をGoogle検索
copyright © 1997-2024 PHP ドキュメント作成グループ(ライセンス). provided by php spot. マニュアル: