Forum Moderators: coopster
However that doesn't look like a time() timestamp. I'm not familiar with what kind of timestamp that is. You could just split it up like this:
<?php
$stamp = "20050808";
$indchars = preg_split('//', $stamp, -1, PREG_SPLIT_NO_EMPTY);
$k=0;
while($k < 4)
{
$year = $year.$indchars[$k];
$k++;
}
while($k < 6)
{
if($indchars[$k] == 0)
{
$indchars[$k] = "";
}
$month = $month.$indchars[$k];
$k++;
}
while($k < 8)
{
if($indchars[$k] == 0)
{
$indchars[$k] = "";
}
$day = $day.$indchars[$k];
$k++;
}
$monthlist = array("", "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December");
$month_name = $monthlist[$month];
echo "$month_name $day, $year";
?>
$newsDate=str_split(($nrEntry->nrDate), 4);
$nrYear=intval($newsDate[0]);
$spltAgain=str_split($newsDate[1], 2);
$nrMonth=intval($spltAgain[0]);
$nrDay=intval($spltAgain[1]);
date("l, F j, Y.", mktime(0,0,0, $nrMonth, $nrDay, $nrYear))
i broke up the string: yyyymmdd and convert to integers
hope this helps someone else by the way,
is there a way to search the forums?
j.