[CSHARP-4540] Translate additional parameters for $dateFromString Created: 21/Feb/23  Updated: 30/Jan/24  Resolved: 30/Jan/24

Status: Closed
Project: C# Driver
Component/s: None
Affects Version/s: None
Fix Version/s: 2.24.0

Type: Improvement Priority: Major - P3
Reporter: PM Bot Assignee: Robert Stam
Resolution: Done Votes: 0
Labels: neweng
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
depends on CSHARP-4858 Provide a way to test if a field exis... Closed
Documented
Issue split
Server Compat: 7.0
Quarter: FY24Q4
Upstream Changes Summary:

DRIVERS-2553:
Java has already implemented date format specifiers. C# will implement support in CSHARP-4540.

Backwards Compatibility: Fully Compatible
Documentation Changes: Needed
Documentation Changes Summary:
  1. What would you like to communicate to the user about this feature?
    2. Would you like the user to see examples of the syntax and/or executable code and its output?
    3. Which versions of the driver/connector does this apply to?

Document new DateFromString methods for LINQ queries.


 Description   

This ticket was split from DRIVERS-2553, please see that ticket for a detailed description.



 Comments   
Comment by Robert Stam [ 26/Dec/23 ]

This issue depends on CSHARP-4858 because that ticket will determine how we add MongoDB specific extension methods going forward.

Comment by James Kovacs [ 09/Mar/23 ]

DateTime.ParseExact(string s, string format, IFormatProvider provider) is a standard framework method that takes an arbitrary format string, but provider would serve no purpose. In addition there is no way to map other aspects of $dateFromString to C# such as timezone, onNull, and onError. We should consider creating our own static method - much as we do for MongoDBMath - to represent $dateFromString.

Generated at Wed Feb 07 21:48:32 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.