下面这段内容讲解的功能是Oracle数据库中有一张表,表中存储了连续的时间记录,同时对应的还存储了一个标记位。
现在要获取一个结果集:当标记位为0时,取前一个为1的时间数据,如果标记位为1时,取当前记录的时间数据。
=================
先上干货。再解释
1、建表
create table test_date(
t_TIME varchar(20), --时间
...
分类:
数据库 时间:
2014-12-30 15:24:02
阅读次数:
230
上次使用了纯php实现了一个观察者模式(php观察者模式), 现在使用php标准库spl在次实现观察者模式,好处是:随意的生成您想使用的观察者!
<?php
/**
* Created by PhpStorm.
* User: evolution
* Date: 14-12-27
* Time: 下午5:50
*/
class Login implements SplSubject ...
分类:
Web程序 时间:
2014-12-27 19:01:23
阅读次数:
173
#include #include //方式一#define DBG_PRINT (printf("%s:%u %s:%s:\t", __FILE__, __LINE__, __DATE__, __TIME__), printf) //方式二void MyPrintf(const char ...
分类:
其他好文 时间:
2014-12-26 16:20:39
阅读次数:
667
C的这些宏有什么意义呢__LINE____FILE____DATE____TIME____STDC____FUNCTION__#include using namespace std;void main(void){cout < < __FILE__ < < endl; // 当...
分类:
其他好文 时间:
2014-12-25 16:01:03
阅读次数:
111
//解决比如3月31号加一个月变成5月1号等问题
$time?=?time();
//当前月份中的第几天
$day?=?date(‘j‘,$time);
//这个月的天数
$month_day?=?date(‘t‘,$time);
//这个月的第一天
$first_day_of_month_time?...
分类:
其他好文 时间:
2014-12-24 16:29:12
阅读次数:
171
一、MySQL 获得当前日期时间 函数 1.1 获得当前日期+时间(date + time)函数:now() mysql> select now(); +---------------------+ | now() | +---------------------+ | 2008-08-08 22:20:46 | +-------------...
分类:
数据库 时间:
2014-12-17 16:35:59
阅读次数:
420
public function getendmouthtime() ? ? { ? ? ? ? $date=date("Y-m",time()); ? ? ? ? $date_arr=explode(‘-‘,$date); ? ? ? ? $year=$date_arr[0]; ? ? ? ? $month=$date_arr[1]; ? ? ? ...
分类:
Web程序 时间:
2014-12-15 17:28:41
阅读次数:
263
1 /** 2 * 格式化日期为 年-月-日 3 * @param time 4 * @return 5 */ 6 public static String formatDate(Date time){ 7 Formatter...
分类:
编程语言 时间:
2014-12-14 18:31:48
阅读次数:
131
boost定时器的&& linux下获取shell命令执行结果&&精确计时器(跨平台课考虑使用boost中的date_time 库)&&linux和windows下建立多级目录...
分类:
其他好文 时间:
2014-12-10 18:08:59
阅读次数:
231
typestruct tmTime structureStructure containing a calendar date and time broken down into its components.The structure contains nine members of typein...
分类:
编程语言 时间:
2014-12-10 17:43:48
阅读次数:
204