access日期的读取
在我的Access中有一个字段是Date/Time格式,我保存在里面的时间是2007/05/04   22:00:00,但用SQL读出来怎么就变成了1178208000000   2007-05-04   24:00:00。以前没做过数据库的开发,不知道该怎么转换这个长日期格式。请会的人教教我~   
 顺便说一下,我是用的Jdbc来连的Access,SQL语句是写成这样的: 
 SELECT   *   FROM   ORDERS   WHERE   (STARTTIME> ?)   AND   (ENDTIME <?),目的就是查询是否有在这个时间段的记录,精度要求在分钟级,修改这条SQL语句改怎么修改呢?   
 谢谢~~
------解决方案--------------------用format()函数.     
 select * 
 from 表名 
 where format(字段名, 'yyyy-mm-dd hh:mm:ss ')> = '2007-05-04 16:12:23 '
------解决方案--------------------select * from tt where f1 
 between #2007-04-21 0:00:00# and #2007-04-24 23:59:59#     
 上述是最有效率的 
 如果一定要用日期,可以这么做,也是最有效率的   
 select * from tt where f1 
 between cdate( "2007-04-21 " &  " 0:00:00 ") and cdate( "2007-04-24 " &  " 23:59:59 " )   
 請參考: 
 http://community.csdn.net/Expert/topic/5429/5429916.xml?temp=.8885157 
------解决方案--------------------如果在纯Access中,用#   
 select *  
 from tt  
 where format(f1,#yyyy-mm-dd HH:MM:SS#) > =STime and format(f1,#yyyy-mm-dd HH:MM:SS#) <= STime
------解决方案----------------------在前台程序中转换一下   
 System.out.println(rs.getDate( "NEWDATE ").toString( "yyyy-MM-dd hh:mm:ss "));