Poolmath app suggestion: bleach date code converter

Quick and dirty

try
{
if ((tbDateCode.Text.Length == 5) && (Convert.ToInt16(tbDateCode.Text) >= 0))
{
int fourDigitYear = CultureInfo.CurrentCulture.Calendar.ToFourDigitYear(Convert.ToInt16(tbDateCode.Text.Substring(0, 2)));
DateTime DateCode = new DateTime(fourDigitYear, 1, 1).AddDays(Convert.ToInt16(tbDateCode.Text.Substring(2, 3)));
MessageBox.Show(DateCode.ToShortDateString());
}
else
{
MessageBox.Show("Invalid date code");
}
}
catch
{
MessageBox.Show("Invalid date code");
}
}
 
  • Like
Reactions: MrXYZ123
Thread Status
Hello , This thread has been inactive for over 60 days. New postings here are unlikely to be seen or responded to by other members. For better visibility, consider Starting A New Thread.