Created
January 4, 2012 08:41
-
-
Save Joruus/1559138 to your computer and use it in GitHub Desktop.
UtilidadesDateTime TwoDigitYearMax
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static class UtilidadesDateTime | |
{ | |
public static CultureInfo Cultura { get; private set; } | |
static UtilidadesDateTime() | |
{ | |
Cultura = new CultureInfo(CultureInfo.CurrentCulture.LCID); | |
Cultura.Calendar.TwoDigitYearMax = 2099; | |
} | |
private static DateTime ConvertDateTimeConDia(string datetime) | |
{ | |
DateTime dt; | |
DateTime.TryParseExact(datetime, | |
"yyMMdd", | |
Cultura, | |
DateTimeStyles.None, | |
out dt); | |
return dt; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment