Google\Cloud\BigQuery\Timestamp::formatAsString PHP Метод

formatAsString() публичный Метод

Format the value as a string.
public formatAsString ( ) : string
Результат string
    public function formatAsString()
    {
        return $this->value->format(self::FORMAT);
    }

Usage Example

 public function testToString()
 {
     $value = new \DateTime();
     $timestamp = new Timestamp($value);
     $expected = $value->format('Y-m-d H:i:s.uP');
     $this->assertEquals($expected, (string) $timestamp);
     $this->assertEquals($expected, $timestamp->formatAsString());
 }