Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
What is corresponding SUBSTR(DTOS(DATE()),3,2)
Message
General information
Forum:
ASP.NET
Category:
Other
Miscellaneous
Thread ID:
00980038
Message ID:
00980063
Views:
65
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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform