Datetime tick precision #859
Replies: 2 comments 3 replies
-
The issue here is: Do DateTimeValues in the Power Fx language carry tick precision? But C# DateTime does. This becomes an issue when serializing/deserializing a DateTime - if we do allow ticks, we don't want to lose them when round-tripping through a serializer. |
Beta Was this translation helpful? Give feedback.
-
I would posit that business applications would rarely (never?) need sub-millisecond precision. Is there any reason (besides "C# supports it") that we would need this kind of precision? If not, then the consistency across all platforms would probably make being a millisecond-precision language a better choice. |
Beta Was this translation helpful? Give feedback.
-
Introduced by #728 and #782.
It happens that there are a few ways to "declare" a DateTimeValue in PFx and not all of them will contain tick information. Examples:
DateTime(2022,11,22,10,1,22,123)
- does not store tick infoDateTimeValue("2022-11-22T09:59:59.1837513-06:00")
- stores tick infoFormulaValue.new(datetimeVariable)
- stores tick infoPFx currently serializes DateTimeValue into the following format (losing tick info):
DateTime(2022,11,22,10,1,22,123)
Question is: do we need to maintain tick info?
Beta Was this translation helpful? Give feedback.
All reactions