我如何解释"FoxPro"?我的C ++程序中的dbf文件日期时间字段(八字节)? [英] How can i interpret "FoxPro" dbf file date time field (eight-byte) in my c++ program?

查看:47
本文介绍了我如何解释"FoxPro"?我的C ++程序中的dbf文件日期时间字段(八字节)?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在编写一个c ++程序来读取foxpro数据库的DBF文件.我偶然发现了这个8字节的日期时间字段,我该怎么解释呢?任何帮助将不胜感激?

I am writing a c++ program to read DBF file of foxpro database .I stumbled upon this date time field of eight bytes.How can i interpret it ? Any help would be highly appreciated ?

推荐答案

该值为double

整数部分是从1899/12/30开始的日子

The integer part is the day since 1899/12/30

internal const double JulianDay_1899_12_30 = 2415019.0;

double d = theValue;

在c#

return DateTime.FromOADate(d - JulianDay_1899_12_30);

请参见 http://msdn.microsoft.com/en-us/library/system.datetime.fromoadate.aspx

这篇关于我如何解释"FoxPro"?我的C ++程序中的dbf文件日期时间字段(八字节)?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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