9 Replies Latest reply: Oct 18, 2010 1:36 PM by 736634 RSS

    How can I split a variable in CCA and submit to stored procedure in as two?

    736634
      I collect a date from caller which is 4 digits long, it is the month and the year. I want to then send to a stored procedure, but need to get the last 2 digits and send as year and the remainer as month.

      For example

      If user inputs 212 for Feb 2012, I want to get the last 2 digits, 12 as $year and the remainer as $month this is due to the month might be some times 1 or 2 digits,
      if the date is 1012 for Oct 2012 , then it would be a 2 digit $month.

      Thank you!