Skip to content

Instantly share code, notes, and snippets.

@Joruus
Created January 4, 2012 08:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Joruus/1559138 to your computer and use it in GitHub Desktop.
Save Joruus/1559138 to your computer and use it in GitHub Desktop.
UtilidadesDateTime TwoDigitYearMax
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