I have a POSTed key of hidtimestamp. Naturally, the value of this key is a string.
Returns: 20100128_18:02
What I want is a DATE object like: 20100128_1802
So, I tried this:
Which returns: 19691231_1800
Could someone please tell me what I'm doing wrong and how I can get my string as a date obj, as well as format it?
Thanks!!
Code:
print_r($_POST['hidtimestamp']);
What I want is a DATE object like: 20100128_1802
So, I tried this:
Code:
$adate = date ('Ymd_Hi', strtotime($_POST['hidtimestamp']));
echo $adate;
Could someone please tell me what I'm doing wrong and how I can get my string as a date obj, as well as format it?
Thanks!!