View Full Version : year help
ThomasAnderson
10-26-2008, 06:03 AM
Hello everyone,
I wanted to know if it's possible to show the year only like this for ex. 08
NOT like this 2008
year = System.GetDate(DATE_FMT_YEAR);
Thanks in advance
ShadowUK
10-26-2008, 06:06 AM
String.Mid(tostring(System.GetDate(DATE_FMT_YEAR)) , 3, 4);
ThomasAnderson
10-26-2008, 06:09 AM
Thanks mate, it works :)
ShadowUK
10-26-2008, 06:09 AM
No problem.
You could also use String.Right, eg.
String.Right(System.GetDate(DATE_FMT_YEAR), 2);
Note:
tostring() is not needed in either of these ways as System.GetDate returns string values and not numbers. So, not needed.
Imagine Programming
10-27-2008, 03:24 AM
You could also use String.Right, eg.
String.Right(System.GetDate(DATE_FMT_YEAR), 2);
Note:
tostring() is not needed in either of these ways as System.GetDate returns string values and not numbers. So, not needed.
tostring(), well you can't ever be sure enough :)
ShadowUK
10-27-2008, 05:21 AM
You could also use String.Right, eg.
String.Right(System.GetDate(DATE_FMT_YEAR), 2);
Note:
tostring() is not needed in either of these ways as System.GetDate returns string values and not numbers. So, not needed.
:<http://indigorose.com/forums/clear.gif
vBulletin® v3.8.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.