Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
What is corresponding SUBSTR(DTOS(DATE()),3,2)
Message
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Divers
Thread ID:
00980038
Message ID:
00980063
Vues:
69
Hi Neil. Thanks for your reply.

I notice that you include 2005..... is there a way of getting the year from just the current date on the machine (as in Date() in VFP)

Regards,

Gerard



>Gerard,
>
>If you are using the DateTime structure then you can just convert the Year component.
>
>DateTime myDateTime = new DateTime(2005, 1, 24);
>MessageBox.Show(myDateTime.Year.ToString());
>
>If you wanted the year without century then you could go a step further and use the String.Remove method.
>
>DateTime myDateTime = new DateTime(2005, 1, 24);
>MessageBox.Show(myDateTime.Year.ToString().Remove(0, 2));
>
>If you are dealing with a string and not a DateTime structure then you can use the String's SubString method.
>
>Regards
>Neil
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform