Hi there.
For use in a search method i would like to parse partial dates in different formats.
I want to enable the user to search for day and month or month and year or also day and month and year.
But the more problematic thing is that i want do this in all possible date formats depending on the country, the user is in. It's a ASP.NET page and i can use the CultureInfo and therefore also the CultureInfo.DateTimeFormat.
Do you have any idea, how to do something like that? I think it would be great that a british person could search 16/05, while an american could enter 05/16 or a german could use 16.05 to find a result from the 16th of may.
I think it could be possible to use the DateTimeFormat.ShortDatePattern. But how could i use it to get day, month and year out of them?
I think of a use like
public void GetDateParts(string SearchStr, out int? day, out int? month, out int? year)
Thanks to anyone who can help me with this.