如何在 SQLite 中将日期时间转换为日期格式?

问题描述:

我想在数据网格中以 DD-MM-YYYY 格式显示日期.默认情况下,SQLite 以日期时间格式存储数据.那么如何在 flex 中使用 SQLite 将日期时间格式转换为日期格式?

I want to show a date in DD-MM-YYYY format in a datagrid. By default, SQLite stores the data in date-time format. So how can I convert date-time format to date format in flex by using SQLite?

您可以使用 strftime,来自 日期和时间函数.

You can use strftime, from Date And Time Functions.

示例:

SELECT strftime('%d-%m-%Y', 'now')

输出:

10-06-2010