将Sqlite BigInt转换为日期 [英] Convert Sqlite BigInt to Date

查看:61
本文介绍了将Sqlite BigInt转换为日期的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个Sqlite数据库,正在用作Quartz.net调度程序作业的ado.net作业存储.在一个表中,名为START_TIME的列的类型为big int.

I have a Sqlite database that I am using as an ado.net job store for my Quartz.net scheduler jobs. In one table, a column called START_TIME is of type big int.

是否有一种方法可以将bigint转换为日期值或将其转换为日期值?我希望能够查询数据库以查看哪些作业计划在什么日期/时间执行,而诸如633869892000000000的值是没有意义的.

Is there a way to cast or convert a bigint to a date value? I would like to be able to query the database to see which jobs are scheduled at what date/time and a value such as 633869892000000000 is meaningless.

谢谢!

推荐答案

这似乎对我有用;从YourTable中选择datetime(DateColumn/10000000-62135596800,'unixepoch')

This seemed to work for me; select datetime(DateColumn/10000000 - 62135596800, 'unixepoch') from YourTable

功劳; https://forums.xamarin.com/discussion/54282/sqlite-datetime-convert-to-net-datetime

这篇关于将Sqlite BigInt转换为日期的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆