View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
witek witek is offline
external usenet poster
 
Posts: 147
Default XLL, C++ and dates

joel wrote:
I is easy to convert a number into a date. Excel stores the date as a
number with Jan 1, 1900 equal 1 and ech day afterwards is equalk to 1.
One hour equal 1/24, 1 minute equals 1/(24*60). You could write your
own function to convert a number to a date and a date to a number.


Theory is beautiful, practice is not.
Leap years, lotus bug make it more difficult.


Also I have numbers like 40000 and dates like 1/1/2009, and both are
passed the same way to XLL function. I need to know if there is a way to
distinguish them. If it is not, I have to rewrite other piece of code,
which I do not want to.