Dim d As Double
d = CType(Marshal.PtrToStructure(iPtr, GetType(Double)), Double)
dr(dc.ColumnName) = Date.FromOADate(d).ToLocalTime
ʽʽSuccess is almost totally dependent upon drive and persistence. The extra energy required to make another effort or try another approach is the secret of winning.ʾʾ --Dennis Waitley
I know you PeekD() the memory, but after that I'm not sure exactly what to-do next...
Example of PeekD() Output: 42622.25267361111
ʽʽSuccess is almost totally dependent upon drive and persistence. The extra energy required to make another effort or try another approach is the secret of winning.ʾʾ --Dennis Waitley
ʽʽSuccess is almost totally dependent upon drive and persistence. The extra energy required to make another effort or try another approach is the secret of winning.ʾʾ --Dennis Waitley
Just going to resort to the Microsoft VariantTimeToSystemTime API. I prototyped it under different name. PB kept complaining about VariantTimeToSystemTime having incorrect number of parameters, and that wasn't true. It uses two, and I've specified just two.
ʽʽSuccess is almost totally dependent upon drive and persistence. The extra energy required to make another effort or try another approach is the secret of winning.ʾʾ --Dennis Waitley
LOL! I figured if people around who had the answer, they would respond.
However your thoughtful. I don't want to look like a madman.
ʽʽSuccess is almost totally dependent upon drive and persistence. The extra energy required to make another effort or try another approach is the secret of winning.ʾʾ --Dennis Waitley
ʽʽSuccess is almost totally dependent upon drive and persistence. The extra energy required to make another effort or try another approach is the secret of winning.ʾʾ --Dennis Waitley
ʽʽSuccess is almost totally dependent upon drive and persistence. The extra energy required to make another effort or try another approach is the secret of winning.ʾʾ --Dennis Waitley
Anyway, for the question, I think that PB doesn't need all this type/ptr/deprecated functions conversion spaghetti stuff. And to answer in a better way, we'd need input, and output type.
I wasn't asking for PB to natively support the conversion. That Office Automation date isn't deprecated, Microsoft uses it still in ESE (JetBlue) database engine.
And the VariantTimeToSystemTime WinAPI hasn't been deprecated.
At least you've made your mark.
ʽʽSuccess is almost totally dependent upon drive and persistence. The extra energy required to make another effort or try another approach is the secret of winning.ʾʾ --Dennis Waitley
I haven't said that it's deprecated I've said that all this conversion stuff could surely be cleaner in PB, as it's not suffering from multiple language evolution.
Anyway, I found someone talking on the forum about vbcorlib, and this by googling, maybe it could help a bit : http://www.kellyethridge.com/vbcorlib/d ... tatic.html
I'm slow, but I'm here with you now. I agree entirely!
I was working on a cross-platform DateTime formula. My math sucks, however I think I was making break-through with it. Factoring leap years and all dat. I'll post when I have something more substantial.
ʽʽSuccess is almost totally dependent upon drive and persistence. The extra energy required to make another effort or try another approach is the secret of winning.ʾʾ --Dennis Waitley
The d parameter is a double-precision floating-point number that represents a date as the number of days before or after the base date, midnight, 30 December 1899. The sign and integral part of d encode the date as a positive or negative day displacement from 30 December 1899, and the absolute value of the fractional part of d encodes the time of day as a fraction of a day displacement from midnight. d must be a value between negative 657435.0 through positive 2958465.99999999.
Note that because of the way dates are encoded, there are two ways of representing any time of day on 30 December 1899. For example, -0.5 and 0.5 both mean noon on 30 December 1899 because a day displacement of plus or minus zero days from the base date is still the base date, and a half day displacement from midnight is noon.
I really think that using floating numbers for date/time is crazy. Never I would have created such a thing. Just imagine that this kind of function could be used for planes or banking data makes me mad !
djes wrote:I really think that using floating numbers for date/time is crazy. Never I would have created such a thing. Just imagine that this kind of function could be used for planes or banking data makes me mad !
ʽʽSuccess is almost totally dependent upon drive and persistence. The extra energy required to make another effort or try another approach is the secret of winning.ʾʾ --Dennis Waitley