FieldtypeDatetime::stringToTimestamp()

Given a date/time string and expected format, convert it to a unix timestamp

Note: this method moved to the WireDateTime class and is kept here for backwards compatibility.

Usage

$int = FieldtypeDatetime::stringToTimestamp(string $str, string $format);

Arguments

NameType(s)Description
$strstring

Date/time string

$formatstring

Format of the date/time string in PHP date syntax

Return value

int


FieldtypeDatetime methods and properties

API reference based on ProcessWire core version 3.0.252