note 104562 added to function.date

From: Date: Thu, 23 Jun 2011 08:32:18 +0000
Subject: note 104562 added to function.date
Groups: php.notes 
Request: Send a blank email to php-notes+get-180862@lists.php.net to get a copy of this message
I have a really simple question but I can't figure it out since I'm kinda new to PHP. I need to output a date from a given timestamp, but keeping the day at 1 (as a number). What I currently have is <?php $cartRow->field_beginningdate[0]['value'] = date ( 'Y-m-j' , $new_sub_start_date); ?> I want the j part to be a fixed "01" or "1". Any suggestion of how to achieve this? ---- Server IP: 69.147.83.197 Probable Submitter: 94.95.239.26 ---- Manual Page -- http://www.php.net/manual/en/function.date.php Edit -- https://master.php.net/note/edit/104562 Del: integrated -- https://master.php.net/note/delete/104562/integrated Del: useless -- https://master.php.net/note/delete/104562/useless Del: bad code -- https://master.php.net/note/delete/104562/bad+code Del: spam -- https://master.php.net/note/delete/104562/spam Del: non-english -- https://master.php.net/note/delete/104562/non-english Del: in docs -- https://master.php.net/note/delete/104562/in+docs Del: other reasons-- https://master.php.net/note/delete/104562 Reject -- https://master.php.net/note/reject/104562 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#180862) next »