我需要在C++中传递DateTime值。 (创建一个插件AmiBroker)在C++中传递日期
我必须将它传递到AmiDate
。
我有长变量的日期。 (从1980年1月1日午夜起的秒数)
目标结构定义如下。
// 8 byte (64 bit) date time stamp
union AmiDate
{
DATE_TIME_INT Date;
struct PackedDate PackDate;
};
struct PackedDate {
// lower 32 bits
unsigned int IsFuturePad:1; // bit marking "future data"
unsigned int Reserved:5; // reserved set to zero
unsigned int MicroSec:10; // microseconds 0..999
unsigned int MilliSec:10; // milliseconds 0..999
unsigned int Second: 6; // 0..59
// higher 32 bits
unsigned int Minute : 6; // 0..59 63 is reserved as EOD marker
unsigned int Hour : 5; // 0..23 31 is reserved as EOD marker
unsigned int Day : 5; // 1..31
unsigned int Month : 4; // 1..12
unsigned int Year : 12; // 0..4095
};
没有找到线索。
什么是你的问题,它解码日期时间? – JoshD 2010-10-16 06:13:06
你想做什么Manjoor?想要将AmiDate传递给一些函数?或者想将某些stdlib的时间转换为AmiDate? – SunnyShah 2010-10-16 06:19:34
我怎么能通过日期? – Manjoor 2010-10-16 06:20:05