Ask a Question related to PHP Development, Design and Development.
-
Andrew Banks #1
Date - formatting
I'm needing to assign the following variable with the following data from
the date. Does anyone have any help they could offer please?
date_day = the current day number I.E 21
date_month = the current month I.E july
date_year = the current year I.E 2003
I also need the following variable for 10 days later
date_day2 =
date_month2 =
date_year2 =
Any help is much appreciated
Andrew Banks Guest
-
Date Formatting
Use the Day function. response.write day("12/1/2003") Of course, is that date the first of December, or the twelth of January? I suggest you... -
Date Formatting Error
I'm experiencing an anomaly with ColdFusion when formatting a string variable as a date at the moment Daylight Savings Time happens. I set a string... -
formatting date() and nbsp;
What I have is a date that I'd like to format to keep it together on one line using non-breaking spaces. I started with: date... -
formatting date
On 30/7/03 2:18 PM, in article bg7guu$b7j$1@forums.macromedia.com, "JemJam" <webforumsuser@macromedia.com> wrote: The systemDate object will... -
Date Formatting Issue
I have Access 2000. On a form, I want to show (in an unbound text box) how long an agreement has been effect, and format it in years and days. ... -
stephan beal #2
Re: Date - formatting
Andrew Banks wrote:
[url]http://www.php.net/date[/url]> I'm needing to assign the following variable with the following data from
> the date. Does anyone have any help they could offer please?
>
> date_day = the current day number I.E 21
> date_month = the current month I.E july
> date_year = the current year I.E 2003
>
> I also need the following variable for 10 days later
--
----- stephan beal
Registered Linux User #71917 [url]http://counter.li.org[/url]
I speak for myself, not my employer. Contents may
be hot. Slippery when wet. Reading disclaimers makes
you go blind. Writing them is worse. You have been Warned.
stephan beal Guest
-
Andrew Banks #3
Re: Date - formatting
thanks stephan. I've got the first bit working ok but having problems
getting to grips with mktime() for adding 10 days to the date.
Cany you help here please?
"stephan beal" <stephan@wanderinghorse.net> wrote in message
news:bfgirj$v72$1@ork.noris.net...from> Andrew Banks wrote:
>> > I'm needing to assign the following variable with the following data>> > the date. Does anyone have any help they could offer please?
> >
> > date_day = the current day number I.E 21
> > date_month = the current month I.E july
> > date_year = the current year I.E 2003
> >
> > I also need the following variable for 10 days later
> [url]http://www.php.net/date[/url]
>
>
> --
> ----- stephan beal
> Registered Linux User #71917 [url]http://counter.li.org[/url]
> I speak for myself, not my employer. Contents may
> be hot. Slippery when wet. Reading disclaimers makes
> you go blind. Writing them is worse. You have been Warned.
>
Andrew Banks Guest
-
Jon Kraft #4
Re: Date - formatting
"Andrew Banks" <banksy@blablablablueyonder.co.uk> wrote:
> "stephan beal" <stephan@wanderinghorse.net> wrote:> from>> Andrew Banks wrote:
>>>> > I'm needing to assign the following variable with the following data>>>> > the date. Does anyone have any help they could offer please?
>> >
>> > date_day = the current day number I.E 21
>> > date_month = the current month I.E july
>> > date_year = the current year I.E 2003
>> >
>> > I also need the following variable for 10 days later
>> [url]http://www.php.net/date[/url]Hi Andrew,> thanks stephan. I've got the first bit working ok but having problems
> getting to grips with mktime() for adding 10 days to the date.
>
> Cany you help here please?
Alternatively you could use strtotime(), e.g.:
$tenDaysAgo = strtotime("-10 day");
$day10DaysAgo = date("d". $tenDaysAgo);
HTH;
JOn
Jon Kraft Guest
-
Mike #5
Re: Date - formatting
dont know what the first bit is but -
$now=mktime();
$tendayslater=$now+4521252; (this is not a real number but the number of
seconds in 10 days ie 10x24x60x60)
bye
"Andrew Banks" <banksy@blablablablueyonder.co.uk> wrote in message
news:AmQSa.1286$iY2.12562590@news-text.cableinet.net...> thanks stephan. I've got the first bit working ok but having problems
> getting to grips with mktime() for adding 10 days to the date.
>
> Cany you help here please?
>
> "stephan beal" <stephan@wanderinghorse.net> wrote in message
> news:bfgirj$v72$1@ork.noris.net...> from> > Andrew Banks wrote:
> >> > > I'm needing to assign the following variable with the following data>> >> > > the date. Does anyone have any help they could offer please?
> > >
> > > date_day = the current day number I.E 21
> > > date_month = the current month I.E july
> > > date_year = the current year I.E 2003
> > >
> > > I also need the following variable for 10 days later
> > [url]http://www.php.net/date[/url]
> >
> >
> > --
> > ----- stephan beal
> > Registered Linux User #71917 [url]http://counter.li.org[/url]
> > I speak for myself, not my employer. Contents may
> > be hot. Slippery when wet. Reading disclaimers makes
> > you go blind. Writing them is worse. You have been Warned.
> >
>
Mike Guest



Reply With Quote

