Jump to content

Archived

This topic is now archived and is closed to further replies.

All4172

PHP Date stamp question...

Recommended Posts

I'm trying to recreate the following in PHP DATE but unsure of what the entire stamp on the end is:

2006071310505

2006 = Year
07    = July
13    = Day in month
10505 = ?????????

Any ideas of what the 5 digit code on the end is?

Share this post


Link to post
Share on other sites
Its some sort of a date stamp that is used to tag article files.  I'm attempting to reproduce it within a PHP script but don't have access to seeing how the original date stamp is done.

Share this post


Link to post
Share on other sites
Do you have any other clues. Is it used in any displays where it is formatted. Do you have anymore examples of the number? Those remaining 5 digits could be just a id tacked on for other purposes. Without more examples, I don't think we can give you an exact answer.

Ken

Share this post


Link to post
Share on other sites
Well best clue I have is this here:

2006070710348

From the Article date itself it appear to be created at 3:48 in the afternoon....and I "think" that when its 10348 that equals 3:48 PM, and if its 00348 that would equal 3:48 AM.  At least that's the best I can come up with.

Share this post


Link to post
Share on other sites
thats the timing i dont know exactly what it is but heres how i decode it

[code]
<?php
$datefromdb = $row['table_row'];
$year = substr($datefromdb,0,4);
$mon  = substr($datefromdb,4,2);
$day  = substr($datefromdb,6,2);
$hour = substr($datefromdb,8,2);
$hour = $hour - 5;
$min  = substr($datefromdb,10,2);
$sec  = substr($datefromdb,12,2);
$time = date("l F dS, Y h:i A",mktime($hour,$min,$sec,$mon,$day,$year));

//then u could display the $time

echo ("$time")
?>
[/code]
after this it comes out like this

Thursday July 13th, 2006 04:42 PM

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.