Google\Cloud\BigQuery\Time::formatAsString PHP Method

formatAsString() public method

Format the value as a string.
public formatAsString ( ) : string
return string
    public function formatAsString()
    {
        return $this->value->format(self::FORMAT);
    }

Usage Example

 public function testToString()
 {
     $value = new \DateTime();
     $time = new Time($value);
     $expected = $value->format('H:i:s.u');
     $this->assertEquals($expected, (string) $time);
     $this->assertEquals($expected, $time->formatAsString());
 }