我有一個表在蜂巢:如何查看蜂巢中的日期時間字符串是否符合要求?
# the description of table
desc baseinfo;
cv_id string None
cv_update string None
......
# data in table is like this
select cv_id, cv_update from baseinfo limit 1;
00001 2015-04-15 16:34:44
我想要做的是這樣的: 我要檢查,如果cv_update是空,它應該符合格式要求,這樣的事情:
# is_format doesn't exist actually
SELECT cv_id, cv_update FROM baseinfo WHERE cv_update is NOT NULL AND cv_update.is_format("%Y-%m-%d %H:%M:%S")
我不知道爲什麼cv_update被存儲爲字符串,我只是得到這個數據庫昨日 – roger