Details
Description
I have created an entity with has a datetime column
Entity.php
/**
* @orm:Column(name="deleteAt", type="datetime")
*/
protected $deletedAt;
/**
* Get DeletedAt
* @return \DateTime
*/
public function getDeletedAt() {
return $this->deletedAt;
}
/**
* Set DeletedAt
* @param \DateTime $deletedAt
*/
public function setDeletedAt(\DateTime $deletedAt) {
$this->deletedAt = $deletedAt;
}
This should work, however I get this error when trying to set a "deleteAt" date
$this->setDeletedAt(new \DateTime());
SQLSTATE[22007]: [Microsoft][SQL Server Native Client 10.0][SQL Server]Conversion failed when converting date and/or time from character string.
This should work afaik.
Activity
Benjamin Eberlei
made changes -
| Field | Original Value | New Value |
|---|---|---|
| Assignee | Benjamin Eberlei [ beberlei ] | Juozas Kaziukenas [ juokaz ] |
Guilherme Blanco
made changes -
| Status | Open [ 1 ] | Resolved [ 5 ] |
| Assignee | Juozas Kaziukenas [ juokaz ] | Guilherme Blanco [ guilhermeblanco ] |
| Fix Version/s | 2.1.3 [ 10162 ] | |
| Resolution | Fixed [ 1 ] |
Benjamin Eberlei
made changes -
| Workflow | jira [ 12476 ] | jira-feedback2 [ 17704 ] |
Benjamin Eberlei
made changes -
| Workflow | jira-feedback2 [ 17704 ] | jira-feedback3 [ 20059 ] |
This list may be incomplete, as errors occurred whilst retrieving source from linked applications:
- Request to http://www.doctrine-project.org/fisheye/ failed: Error in remote call to 'FishEye 0 (http://www.doctrine-project.org/fisheye/)' (http://www.doctrine-project.org/fisheye) [AbstractRestCommand{path='/rest-service-fe/search-v1/crossRepositoryQuery', params={query=DBAL-102, expand=changesets[-21:-1].revisions[0:29],reviews}, methodType=GET}] : Received status code 503 (Service Temporarily Unavailable)
Are yo using columns of type "datetime" or "datetime2" in MSSQL? The former is not supported.