如何删除Oracle中日期时间字段的时间部分?例如,我有Mat generate_kernel(int size)
{
if (size % 2 == 0)
{
printf("Input %i, not even, replaced by %i\n", size, size + 1);
size++;
}
Mat out = -1 * Mat::ones(size + 2, size + 2, CV_8S);
Mat center = Mat(out, Rect(1, 1, size, size));
center = Mat::ones(size, size, CV_8S);
return out;
}
,我只需要11/22/2016 12:00:00 PM
。
我试过这段代码:
11/22/2016
答案 0 :(得分:0)
假设根据评论中的信息,您有一个syracuse(5) =
[5] + syracuse(16) =
[5] + [16] + syracuse(8) =
[5] + [16] + [8] + syracuse(4) =
[5] + [16] + [8] + [4] = syracuse(2) =
[5] + [16] + [8] + [4] + [2] + syracuse(1) =
[5] + [16] + [8] + [4] + [2] + [1] =
[5, 16, 8, 4, 2, 1]
列,您可以使用具有正确格式的SELECT v1.PID, v1.EID, v1.PEPts
FROM (
SELECT
p.PID, e.EID, pe.PEPts
ROW_NUMBER() OVER(PARTITION BY e.ESeasonID, e.ECat ORDER BY pe.PEPts DESC) AS r_num
FROM player as p
INNER JOIN player_event as pe ON p.PID=pe.PID
INNER JOIN event as e ON pe.EID=e.EID
WHERE e.ESeasonID=171801 AND e.ECat='Cup/Challenge'
) v1
WHERE r_num <= 2;
函数:
date
答案 1 :(得分:-1)
尝试将其投放为日期:
SELECT CAST(YourTimestampField AS DATE) AS MyDateField