Welcome to dbForumz.com!
FAQFAQ    SearchSearch      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

date

 
   Database Forums (Home) -> PHP SQL RSS
Next:  DBMS advantage and disadvantage  
Author Message
sim

External


Since: Jun 05, 2008
Posts: 4



(Msg. 1) Posted: Thu Jun 05, 2008 6:44 pm
Post subject: date
Archived from groups: alt>php>sql (more info?)

how can i add two date or can get next date by adding 10 day like
date()+10 in date()+date() c, c++ or other lang.

 >> Stay informed about: date 
Back to top
Login to vote
J.O. Aho

External


Since: Dec 01, 2003
Posts: 397



(Msg. 2) Posted: Fri Jun 06, 2008 8:24 am
Post subject: Re: date [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

sim wrote:
> how can i add two date or can get next date by adding 10 day like
> date()+10 in date()+date() c, c++ or other lang.

strtodate("+10 days",time());

http://www.php.net/manual/en/function.strtotime.php


--

//Aho

 >> Stay informed about: date 
Back to top
Login to vote
Captain Paralytic

External


Since: Apr 23, 2007
Posts: 89



(Msg. 3) Posted: Tue Jun 10, 2008 8:51 am
Post subject: Re: date [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

On 10 Jun, 16:16, Jordan wrote:
> J.O. Aho escreveu:
>
> > sim wrote:
> >> how can i add two date or  can get next date by adding 10 day like
> >> date()+10 in  date()+date() c, c++ or other lang.
>
> > strtodate("+10 days",time());
>
> >http://www.php.net/manual/en/function.strtotime.php
>
> How can I setup Mysql date to something like this 'dd/mm/YYYY'?
> I use Mysql v5.0
>
> JD.

See the DATE_FORMAT() function in the manual

http://dev.mysql.com/doc/refman/5.0/en/date-and-time-functions.html#fu...ion_dat
 >> Stay informed about: date 
Back to top
Login to vote
Jordan

External


Since: Jun 10, 2008
Posts: 6



(Msg. 4) Posted: Tue Jun 10, 2008 12:16 pm
Post subject: Re: date [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

J.O. Aho escreveu:
> sim wrote:
>> how can i add two date or can get next date by adding 10 day like
>> date()+10 in date()+date() c, c++ or other lang.
>
> strtodate("+10 days",time());
>
> http://www.php.net/manual/en/function.strtotime.php
>
>

How can I setup Mysql date to something like this 'dd/mm/YYYY'?
I use Mysql v5.0

JD.
 >> Stay informed about: date 
Back to top
Login to vote
Display posts from previous:   
Related Topics:
Date Format - Hi, I recently converted data and discovered that when the date wasn't formatted properly '01/01/001' (I think) I was unable to find the record using Sql i.e 'Select * from table where order_#=100' . However, using utilities (Navicat) I was able to find....

Date issue - Hi, I am running MySQL 4.0.14 with PHP 5.1.4. I have a table where I'm writing a timestamp field with the now() variable. When I try to read it (formatted or not), I get a weird date output Year 1933 or 1907. Any specific setting I'm missing to output...

Current date with mssql - I have a fresh installation of PHP 5.0.4, ISAPI module , on a win2003 with IIS 6.0 and mssql 2000. When I query MSSQL using "mssql_query( )" function using the following: "INSERT INTO DATES (date) VALUES ({ fn ...

how to truncate a MySQL date - Hi, I have a MySQL column that's of a DATETIME type. What MySQL function can I apply to it in a SELECT statement to make the time midnight? FOr example, if a value of the column was 2006-03-07 21:00:00 I'd like to apply a MySQL function and make the...

Setting date format through PHP? - Hi, is it possible to teach MySQL to accept and output dates in format: DD.MM.YYYY rather than YYYY-MM-DD? I read somewhere that this can be configured in some system global files. What I am looking for is a method to set this in (and for) a particular....
   Database Forums (Home) -> PHP SQL All times are: Pacific Time (US & Canada)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]