SELECT CURRENT_DATE - (DAYOFWEEK(CURRENT_DATE) - 2 + (ROW_NUMBER() OVER (ORDER BY 1) ) ) DAY AS result FROM SYSIBM.SYSCOLUMNS fetch first 7 rows only; 输出结果: 2013-03-24 2013-03-23 2013-03-22 2013-03-21 2013-03-20 2013-03-19 2013-03-18 你可以看情况, 自己再做一下排序…
# -*- coding: utf-8 -*- '''获取当前日期前后N天或N月的日期''' from time import strftime, localtime from datetime import timedelta, date import calendar year = strftime("%Y",localtime()) mon = strftime("%m",localtime()) day = strftime("%d",l…
今天项目中用到了一点 随便记录一下 function timestampToTime(timestamp) { );//时间戳为10位需*1000,时间戳为13位的话不需乘1000 var Y = date.getFullYear() + '-'; < ? ) : date.getMonth()+) + '月'; var D = date.getDate(); var h = date.getHours() + ':'; var m = date.getMinutes() + ':'; var…
# -*- coding: utf- -*- '''获取当前日期前后N天或N月的日期''' from time import strftime, localtime from datetime import timedelta, date import calendar year = strftime("%Y",localtime()) mon = strftime("%m",localtime()) day = strftime("%d",lo…