Converting Date into CYYDDD

Converting Date into CYYDDD

In cases where we have to use a Century in the date. Here are some examples below:


  • Retrieve Current Date --
  • Source: [SystemDate] -- Source Format: 1yyDDD
  • Target: Alpha Field -- 113108

  • ConvertDate April 18, 2013
  • Source: Date Field -- 20130418 --> Source Format: yyyyMMdd
  • Target: Alpha Field -- 113108 --> Target Format: 1yyDDD

By: on
load('http://www.extol.com/extolnews.rss'); $feed = array(); foreach ($rss->getElementsByTagName('item') as $node) { $item = array ( 'title' => $node->getElementsByTagName('title')->item(0)->nodeValue, 'desc' => $node->getElementsByTagName('description')->item(0)->nodeValue, 'link' => $node->getElementsByTagName('link')->item(0)->nodeValue, 'date' => $node->getElementsByTagName('pubDate')->item(0)->nodeValue, ); array_push($feed, $item); } $limit = 4; echo ' A free web counter provided by GoStats.