On 5/21/07, Mike Ryan <[EMAIL PROTECTED]> wrote:
Sorry I am a bit of a newbie with php and hope this has not been aswered a
million times, but here it goes
I have a date base with a couple of date fields when I pull up and display
the fields it show 2007-05-21. the question I have is how to con
To view the terms under which this email is distributed, please go to
http://disclaimer.leedsmet.ac.uk/email.htm
On 25 November 2004 18:39, Stuart Felenstein wrote:
> I'm getting a:
> Parse error: parse error, unexpected '%' in
> /home/mysite/public_html/userpage.php on line 120
>
> $rsVJ->
Thanks to all, it help me a lot
manisha
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
On Tuesday, November 25, 2003, at 01:42 PM, Manisha Sathe wrote:
I have a date returned from MySQL in '-MM-DD' format, i want to
show
this date in 'DD/MM/' format using PHP, date() function does the
same if
i pass timestamp in int format, but how to convert into int timestamp
?
e.g f
Manisha Sathe wrote:
I have a date returned from MySQL in '-MM-DD' format, i want to show
this date in 'DD/MM/' format using PHP, date() function does the same if
i pass timestamp in int format, but how to convert into int timestamp ?
e.g from '2003-11-25' to '20031125' ? and
Then I believ
> I don't know of another program. As long as you write a unix timestamp
> or some date format that can be parsed by strtotime(), then you can do
> it this way. Use fopen()/fread() to get the last time saved in the file.
> If you're using unix timestamps, just see if the current time is greater
>
> I'm not using this for any database related function. What I'm trying
to
> do is come up with a method for scheduling processes needed for our
> company that are run through command line php scripts. I'll be using
cron
> or to run a command that will check the date within the file and see
if
> t
I'm not using this for any database related function. What I'm trying to
do is come up with a method for scheduling processes needed for our
company that are run through command line php scripts. I'll be using cron
or to run a command that will check the date within the file and see if
the proces
> Is it possible to read a string from a text file (i.e.
> 0502031130) and be able to use that in a date function such as:
>
> $date = date("dmyHi", strtotime('+28 days));
>
> How would I use that string as the date in the above code?
What database are you using? You can probably do all of thi
Hi,
Thursday, February 6, 2003, 2:41:42 AM, you wrote:
ehhc> Is it possible to read a string from a text file (i.e.
ehhc> 0502031130) and be able to use that in a date function such as:
ehhc> $date = date("dmyHi", strtotime('+28 days));
ehhc> How would I use that string as the date in the ab
Thanks everyone for the helpful answers.
I agree that manuals are useful, but there are times when an example works
better.
I took all of this information, and some details from earlier posts about
dates, and produced the following function to make it easy to format dates
without have to go
I know everyone love to quote read the manual and forget that we[newbies]
are only asking here because we need help...so here you go...
You can do the following...
DATE_FORMAT IS THE MySQL Command
And let say you want to format your date as the following mm-dd-yy(US) or
dd-mm-yy(the rest of th
From http://www.mysql.com/doc/en/Using_DATE.html
The format of a DATE value is '-MM-DD'. According to ANSI SQL, no other
format is allowed. You should use this format in UPDATE expressions and in
the WHERE clause of SELECT statements. For example:
mysql> SELECT * FROM tbl_name WHERE date
Reformatting before an inserting/updating is one option, but how would we
change the mySQL database to accept the other format?
Peter
At 04:18 PM 9/12/2002 +0800, Jacob Miller wrote:
>Why can't you just reformat it before inserting it into the db?
>
> $date = "31.12.2002";
>
>
Why can't you just reformat it before inserting it into the db?
$date = "31.12.2002";
$parts = split("\.", $date);
echo $parts[2]."-".$parts[1]."-".$parts[0];
- jacob
At 16:13 09/12/2002, Tommi Virtanen wrote:
>Well, insert format in wrong, but in Finland enter forma
Well, insert format in wrong, but in Finland enter format is dd.mm.,
so I cannot use other insert format (it have to do other way).
gustavus
>It looks to me like the database is interpreting your date
>incorrectly. Try changing the format you use to insert, -mm-dd
--
PHP General Ma
It looks to me like the database is interpreting your date
incorrectly. Try changing the format you use to insert, -mm-dd
- jacob
At 15:11 09/12/2002, Tommi Virtanen wrote:
>Hi!
>
>I have web-form, which has field (10 chars), there I enter date (format
>dd.mm.). Then data saves to data
On Fri, 26 Apr 2002, Ananth Rajaraman wrote:
> I'm trying to query a date field from mySQL and
> display in a differnet format.
>
> the mysql date is in the format -MM-DD and I want
> to convert it to DD-MM-
>
> how do I do that?
How did you figure out anything else that you've done in
On Saturday 27 April 2002 14:43, Ananth Rajaraman wrote:
> Hi all,
> I'm trying to query a date field from mySQL and
> display in a differnet format.
>
> the mysql date is in the format -MM-DD and I want
> to convert it to DD-MM-
>
> how do I do that?
Use mysql's extensive date formatting
Hamish,
A quick read through the date functions in the manual is worthwhile
http://www.php.net/manual/en/ref.datetime.php
In particular, you need to look at strtotime() and date().
strtotime() is an often overlooked function, useful for getting almost any
english written date into a unix timest
$today = date("d/m/Y");
That will get the current date and dump it in the format you asked for
(DD/MM/, complete with leading zeros).
Mike Frazer
"Rick Emery" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
list($y,$m,$d) = explode(",",$phpdate);
$newdate
I don't know how you are getting your (,mm,dd).
But, try looking the "date" function.
It should do the trick for you.
--- Jose <[EMAIL PROTECTED]> wrote:
> Hi all.
> How can I write the date in this format (dd/mm/)
> if php gives me
> (,mm,dd)??
>
> Thanks
>
-
list($y,$m,$d) = explode(",",$phpdate);
$newdate = "$d/$m/$y";
-Original Message-
From: Jose [mailto:[EMAIL PROTECTED]]
Sent: Friday, February 01, 2002 9:36 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Date format
Hi all.
How can I write the date in this format (dd/mm/) if php gives me
(
On Wed, 21 Feb 2001 11:36:02 -0800, Jerry Lake ([EMAIL PROTECTED])
wrote:
>I have a field in my MySQL DB that is "DATE"
>
>on the form that populates this field, various
>people will by typing in dates in various formats
>
>how to I convert say 2/21/01 or 02-21-2001 etc...
>to 2001-02-21(MySQL For
24 matches
Mail list logo