因为sqlite为弱引用,使用字段前将他强制转为日期型,用datetime.或者最原始的 strftime. SELECT distinct ID from testTable where datetime(availDate) between datetime('2015-01-12 04:00') and datetime('2015-01-13 00:00'); SQLite日期时间函数 SQLite支持以下五个日期时间函数: date(timestring, modifier, modi
Java ascii码值转为输出ascii码 public static void main(String[] args) { // TODO Auto-generated method stub String a = "\001"; if("\001".equals(a)){ a = "001"; int b = Integer.valueOf(a); //转为ascii char c = (char)b; //转为String String
先将 int 型转为 String 型,然后再将 String 转为 long 型,如下图: public class TestIntToLong { public static void main(String[] args) { int num = 18; String str =String.valueOf( num ); // 先要把int转为字符串 long value = Long.parseLong( str ); // 再讲String型装维long型 System.out.pr
在搞数据库时,发现有这样的一个字段,类型是NUMBER(38),查看了一下里面的数据,都是这样的: 1323957678114132132699429513221293068041322129716220 猜到应该是1970年1月1号0点0分距现在的毫秒值. 解决办法是写一个转换函数: create or replace function num_to_date(in_number NUMBER) return date isbegin return(TO_DATE('19700101','
--问题:将aa转换为Int类型失败 string aa="3,5,11,56,88,45,23"; select * from ERPBuMen where ID in(aa) ; --方法select * from ERPBuMen where charindex(','+ltrim(ID)+',',','+'3,5,11,56,88,45,23'+',')>0 ltrim(rtrim(m.cust_id)) 去掉cust_id字段的左右空格 CHARINDEX 返回字符串中