sbornstein2
asked on
C# DateTime from Month and Year
Hello all,
I have the following, Month Abbreviation such as Jan and Year such as 2015 in a string "Jan 2015". I need to take that and get the 1st and last day of that month into two datetime variables.
I got the month abbreviation using:
DateTimeFormatInfo mfi = new DateTimeFormatInfo();
mfi.GetAbbreviatedMonthNam e(1) as an example.
I guess I need to parse the numeric and string portion to do this? So in the above case Jan 2015 I would want two datetime variables as:
DateTime startDate = 1/12015
DateTime endDate = 1/31/2015
I have the following, Month Abbreviation such as Jan and Year such as 2015 in a string "Jan 2015". I need to take that and get the 1st and last day of that month into two datetime variables.
I got the month abbreviation using:
DateTimeFormatInfo mfi = new DateTimeFormatInfo();
mfi.GetAbbreviatedMonthNam
I guess I need to parse the numeric and string portion to do this? So in the above case Jan 2015 I would want two datetime variables as:
DateTime startDate = 1/12015
DateTime endDate = 1/31/2015
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
You are welcome!
.Net is magic.
/gustav
.Net is magic.
/gustav
ASKER