your welcome.
>Yes I just found out.
>Thank Alexandre.
>
>
>>Sam remember in .net everything is 0 based, while in VFp is 1 base so instead of cKey += nYear.ToString().Substring(3, 2); do cKey += nYear.ToString().Substring(2, 2);
>>
>>
>>>Hello.
>>>
>>>I'm getting an error on the last line of the code below
"ArgumentOutOfRangeException Make sure all arguments to this method have valid values as defined by the invoked method....">>>
>>>
>>>
>>>int nYear = DateTime.Now.Year;
>>>int nDay = DateTime.Now.Day;
>>>int nMonth = DateTime.Now.Month;
>>>string cKey = nMonth.ToString().PadLeft(2, '0');
>>>cKey += nDay.ToString().PadLeft(2, '0');
>>>cKey += nYear.ToString().Substring(3, 2);
>>>
>>>
>>>
>>>What am I doing wrong?
>>>
>>>TIA.
Alexandre Palma
Senior Application Architect