>I am instancing a VFP COM object from a .NET object through COM Interop. I need to pass a datetime between the two. Since I can't make any assumptions about the .NET client's time formatting, I was thinking of using clock ticks. A few minutes ago, this is what I got from
>
>Console.WriteLine( System.DateTime.Now.Ticks.ToString() );
>631809485615112500
>
>Is there a good way to convert that to a legit VFP datetime?
>
>
>Or is there a better method for passing datetime between the two platforms?
>
>Thanks.
Try :
Console.WriteLine(System.DateTime.Now.ToString("yyyyMMddHHmmss"));
It's same as ttoc(datetime(),1), VFP could easily convert it :
lcDatetime = ttoc(datetime(),1)
ltDateTime = ctot(trans(lcDateTime,'@R ^9999/99/99 99:99:99'))
Cetin