I'm a Micrsoft programmer, but I am always retrieving data from AS400. But I have a field where my dates are stored as a decimal, i.e., 1102 for Jan. 1, 2002, or 101599 for Oct. 15, 99. So basically, I need the right two characters because I need to get the year at the least. It would be nice if I could convert it to a whole date as well.
But just the year would be OK. I don't see a way I could use substr() in an SQL statement that would consistently select the year, because the total number of characters would vary.
If all else fails, I will get my recordset in VB and make a function to evaluate the length of the date and strip out the year appropiately.
But I was wondering if anyone knows of a "Right"-like function that might do what I need.
Thanks.
But just the year would be OK. I don't see a way I could use substr() in an SQL statement that would consistently select the year, because the total number of characters would vary.
If all else fails, I will get my recordset in VB and make a function to evaluate the length of the date and strip out the year appropiately.
But I was wondering if anyone knows of a "Right"-like function that might do what I need.
Thanks.