the string was not recognized as a valid Date time.There is a unknown word starting at index 0.
bonjour tout le monde,
J ai un souci avec les date time.
J ai implemente une solution qui marche bien sur mon vpc, j ai jamais eu cette erreur, mais la en l envoyant a la personne en charge de la tester sur la plateforme de test, y a cette erreur qui apparait :
Citation:
the string was not recognized as a valid Date time.There is a unknown word starting at index 0.
voila le code utilise :
Code:
1 2 3 4 5 6 7 8 9 10 11
|
string Date_Today = DateTime.Now.ToString("MMyy");
int period = license_duration; // in months
period = period * 30;
System.DateTime today = System.DateTime.Now;
System.TimeSpan duration = new System.TimeSpan(period, 0, 0, 0, 0);
DateTime Date_Command = today.Add(duration);
string str_Date_Command = Date_Command.ToString("yyMM"); |
Merci d avance de votre aide !