Home>

In a SQL statement, I want to get only the date from a cell that contains the date and time.
Specifically, I would like to do as follows.

Original table
| date | id |
| 2010/5/10 12:10:00 | A |
| 2011/6/10 13:10:00 | B |
| 2011/10/10 12:10:00 | D |

Data I want to output
| date | id |
| 2010/5/10 | A |
| 2011/6/10 | B |
| 2011/10/10 | D |

Even if I try to use the following query using cast, only the age is acquired and the date cannot be acquired.
If anyone knows how to deal with it, would you please let me know?
Thank you.

select CAST (date as DATE), id from test