Results in this exception, where Args has a null, as the Date value was filtered out in argument preprocessing:
System.NullReferenceException: Object reference not set to an instance of an object.
at Microsoft.PowerFx.Functions.Library.NumericNegate(IRContext irContext, NumberValue[] args)
In Excel, these display as ###... but the underlying number is there if you change the formatting (-1 and -0.5 for the first two, the DateTime function is not available in Excel). Canvas shows the first two as 12/31/2039 and 8 PM (in PST).
Excel returns a #VALUE! error for Text( -1, "yyyy-mm-dd" ), Canvas returns in a label control 1969-12-31 which appears to be using the JavaScript epoch (with or without Excel compat), and C# reutrns 1899-12-29 which appears to be using the Excel epoch.
Obviously we shouldn't have the exception and I think across the board we should be matching Excel results.
-Date(1900,1,1)
-Time(12,0,0)
-DateTime(1900,1,1,12,0,0)
Results in this exception, where Args has a null, as the Date value was filtered out in argument preprocessing: System.NullReferenceException: Object reference not set to an instance of an object. at Microsoft.PowerFx.Functions.Library.NumericNegate(IRContext irContext, NumberValue[] args)
In Excel, these display as ###... but the underlying number is there if you change the formatting (-1 and -0.5 for the first two, the DateTime function is not available in Excel). Canvas shows the first two as 12/31/2039 and 8 PM (in PST).
Excel returns a #VALUE! error for
Text( -1, "yyyy-mm-dd" )
, Canvas returns in a label control1969-12-31
which appears to be using the JavaScript epoch (with or without Excel compat), and C# reutrns1899-12-29
which appears to be using the Excel epoch.Obviously we shouldn't have the exception and I think across the board we should be matching Excel results.