Hi Everybody,
My C# function takes an array as an input. One of the values in the
array is a date value. When I iterate though the array to retrieve the
date value I get the numeric equivalent of Excel date representation
instead of a string. How do I convert this to a valid .NET data time
object?
For example “4/15/2010” is returned as 40283.0. Sample code
[ExcelFunction]
public static object TestFunc(object[,] parameters)
{
DateTime.Parse(parameters[0, 0].ToString()); // does not work
Double d = parameters[0, 0]; // d is 40283.0
}
Any help greatly appreciated.
Thank you,
Ram
--
You received this message because you are subscribed to the Google Groups "ExcelDna" group.
To post to this group, send email to
exce...@googlegroups.com.
To unsubscribe from this group, send email to
exceldna+u...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/exceldna?hl=en.