We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Problem with DateDiff function

I am trialling Aspose Cells ( using Visual Studio 2005 and Windows XP.
I can't use function DateDiff althought it's been in the formula list which I have read in the documentation.
When I put this formula to the cells:

Dim AspWorkBook As New Aspose.Cells.Workbook
Dim AspWorkSheet As Aspose.Cells.Worksheet = AspWorkBook.Worksheets(0)
AspWorkSheet.Name = "MySheet"

, then it returns this error :
Doesn't Aspose support this function ?


Hi Hau,

No, it 's not in the list:


But we may consider it and support it soon for your requirment.

Thank you.

Hi Hau,

It seems that DateDiff is not an Excel function. I don't find it in MS Excel help and if I input it in Excel I also get a "#NAME?" error.

To serve your need, I think there is a simpler way:

You can put datetime value in B1 and C1, and input "=B1-C1" formula in cell A1.

Hi Laurence.
I found DateDiff function name in Aspose help!, but in Excel it true name is DateDif (D1,D2,"d"),
I need this function to count an integer second, hour, month, year ..., value between two date parameter.
Best Regrads.

Hi Hau,

Where do you find the DateDiff function in Aspose help? We don't find it.

Anyway, we will support this function soon. You will get a fix in the next week.

Hi Laurence,

I found DataDiff function at http://www.aspose.com/documentation/ssrs-rendering-extensions/aspose.cells-for-reporting-services/formula-list.html
You can try this link.
Moreover, DateDif is a Excel function ( not DateDiff ). You can test it in Excel :
Althought it's not in Excel help.


Hi Hau,

Please try this fix.

We have supported to set and calculate thie function.

We only support "Y","M" and "D" as Unit param value in calculating this function.