Hi, I have an input date in format “Jan 25” where Jan is month and 25 is year. But the day is not specified in the input date. How can I extract only year 2025 from this input? I tried with code Convert.ToDateTime(inputDate).Year which returns 2023 as output. But I want 2025 as output. Can anyone please suggest a solution for this issue? Thanks in advance!
Please try this
Datetime.ParseExact("Jan 25","MMM yy",System.Globalization.CultureInfo.InvariantCulture).Year
Hi @renjutom ,
Can you try this
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.