On Tue, Aug 5, 2008 at 11:48 AM, Don Don <[EMAIL PROTECTED]> wrote:
> Hi all,
>
> I've got dates in the following formats e.g.
>
> August 05, 2008, 10:14 am (e.g. today's date)
> August 04, 2008, 7:08 am (e.g. yesterda's date)
> August 03, 2008, 9:08 am (e.g. in the past)
>
> I am trying to format
On Tue, Aug 5, 2008 at 11:48 AM, Don Don <[EMAIL PROTECTED]> wrote:
> Hi all,
>
> I've got dates in the following formats e.g.
>
> August 05, 2008, 10:14 am (e.g. today's date)
> August 04, 2008, 7:08 am (e.g. yesterda's date)
> August 03, 2008, 9:08 am (e.g. in the past)
>
> I am trying to format
Hi all,
I've got dates in the following formats e.g.
August 05, 2008, 10:14 am (e.g. today's date)
August 04, 2008, 7:08 am (e.g. yesterda's date)
August 03, 2008, 9:08 am (e.g. in the past)
I am trying to format these dates do I can display them like this
Today at 10:14 am (today)
Yesterday at
On Wed, August 29, 2007 4:12 pm, Mike Ryan wrote:
> I would like to have my users input the date formate as mm-dd-
> mysql
> wants the data to come down as -mm-dd.
>
> The question I have is how do I convert from the mm-dd- to
> -mm-dd so
> that I can write it out to the database?
Just have your input form get it in sections, then piece it all together when
dumping it to MySQL
This way you can transparent the code on the front to users, but have it in the
right format in the backend.
Mike Ryan <[EMAIL PROTECTED]> wrote:
> I would like to have my users input the dat
I would like to have my users input the date formate as mm-dd- mysql
wants the data to come down as -mm-dd.
The question I have is how do I convert from the mm-dd- to -mm-dd so
that I can write it out to the database?
--
PHP General Mailing List (http://www.php.net/)
To unsubscri
have you ever had the need to programmatically convert a date()
compatible date formatting string with one compatible for strftime()?
I had this problem recently when I had to l10n an existing app (and
support legacy data - which include date() formatting strings - at the
same time) ... I came up
thanks for all the replies. I was able to use the date_format() from MySQL.
Clint
- Original Message -
From: "Rick Emery" <[EMAIL PROTECTED]>
To: "Clint Tredway" <[EMAIL PROTECTED]>;
<[EMAIL PROTECTED]>
Sent: Friday, December 13, 2002 1:13 PM
Subjec
iday, December 13, 2002 11:55 AM
Subject: [PHP] Date Formatting
How can I format a date coming out of a MySQL? I know how to format today's date but
not a
date coming out of MySQL. I have looked through the manual, but I must be blind
because I
cannot figure it out.
Thanks,
Clint
--
PHP Gen
edway" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, December 13, 2002 12:55 PM
Subject: [PHP] Date Formatting
How can I format a date coming out of a MySQL? I know how to format today's
date but not a date coming out of MySQL. I have looked through the manual,
bu
Oct 277'
- Original Message -
From: "Clint Tredway" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, December 13, 2002 11:55 AM
Subject: [PHP] Date Formatting
How can I format a date coming out of a MySQL? I know how to format today's
date b
Use this:
function makedate($format, $indate)
{
$temp = explode("-", $indate);
$fulldate = mktime(0, 0, 0, $temp[1], $temp[2], $temp[0]);
$temp = date($format, $fulldate);
return ($temp);
}
and call it with thi
How can I format a date coming out of a MySQL? I know how to format today's date but
not a date coming out of MySQL. I have looked through the manual, but I must be blind
because I cannot figure it out.
Thanks,
Clint
> I have the following query :
> for($i = 0; $i <=$num_results; $i++)
> {
> $row = mysql_fetch_object($result);
> echo "\n"
>."\n"
You can save some typing if you just set the bgcolor in the , instead of
each , FYI. Also, align defaults to "left", doesn't it? So you can
probably leave tha
Hi,
I have the following query :
for($i = 0; $i <=$num_results; $i++)
{
$row = mysql_fetch_object($result);
echo "\n"
."\n"
."$row->id\n"
."$row->Nombre\n"
."$row->Apellido\n"
."$row->Direccion\n"
."$row->Ciudad\n"
."$row->Telefono\n"
."$row
On Wed, Jul 10, 2002 at 12:25:08PM -0500, Rw wrote:
>
> "01-02-2003"
>
> Is there a handy function to convert that to other ways of expressing the
> date such as:
>
> "01/02/03"
$temp = preg_replace('/^(\d{2})-(\d{2})-(\d{2})(\d{2})$/', '\\1/\\2/\\4',
$date);
> "2003-01-02"
$temp = preg_r
From: Rw [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, July 10, 2002 11:25 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Date formatting
Had trouble getting this posed at the newsgroup - will try on the maillist
here:
I have a date field passed in a form like this:
"01-02-2003"
Is there a ha
Had trouble getting this posed at the newsgroup - will try on the maillist
here:
I have a date field passed in a form like this:
"01-02-2003"
Is there a handy function to convert that to other ways of expressing the
date such as:
"01/02/03"
OR
"2003-01-02"
I know the syntax of the date form
Hi! =)
I'm doing a website that will be using a pay-per-month membership
program. There's a field for 'lastpaid' that holds the date the last
paid (sorry to state the obvious). My questions are these:
1) What would be the best way to format it so PHP can see if it's been
30 days since it was last
Here, play with this. dtAuctionStart is a MySQL date field, so substitute
your own connection and var.
Have fun - Miles Thompson
Some messing about with dates
=
";
echo date ("Y-m-d", $dtAuctionStart ), "";
//$strDate = $dtAuctionStart ;
echo "dtAuctionStart : $dt
On Monday, December 10, 2001, at 09:35 PM, phantom wrote:
> What would be an easy what to format a date value into month day year??
> I want to specially display a date stored in mysql in date format
> -MM-DD
>
> The manual says: string date (string format, int [timestamp])
>
> I tried $For
OTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, December 10, 2001 8:35 PM
Subject: [PHP] Date formatting
> What would be an easy what to format a date value into month day year??
> I want to specially display a date stored in mysql in date format
> -MM-DD
>
> The manual
What would be an easy what to format a date value into month day year??
I want to specially display a date stored in mysql in date format
-MM-DD
The manual says: string date (string format, int [timestamp])
I tried $FormattedDate = date("F y, Y",${StoredDate})
1999-04-15 spit out December 3
From: Paul McGee <[EMAIL PROTECTED]>
Date: Thu, Aug 30, 2001 at 12:45:49PM -0400
Message-ID: <[EMAIL PROTECTED]>
Subject: Re: [PHP] Date formatting in PHP 3.0
> Thanks, I knew it was something stupid!
>
> However, the $dy = date ("D", $row[0]) doesn't work.
hu, Aug 30, 2001 at 12:13:21PM -0400
> Message-ID: <[EMAIL PROTECTED]>
> Subject: [PHP] Date formatting in PHP 3.0
>
> > I'm looping through a MSQL db pulling out the dates where I would like
to
> > display the date and then the day of the week. The problem is that
ev
From: Paul McGee <[EMAIL PROTECTED]>
Date: Thu, Aug 30, 2001 at 12:13:21PM -0400
Message-ID: <[EMAIL PROTECTED]>
Subject: [PHP] Date formatting in PHP 3.0
> I'm looping through a MSQL db pulling out the dates where I would like to
> display the date and then the day of th
I'm looping through a MSQL db pulling out the dates where I would like to
display the date and then the day of the week. The problem is that every
date returns the same day of the week, Wed. I checked the documentation and
it doesn't say anything about the expression only being executed once duri
You need a UNIX timestamp for the second argument in date() - thus you need
to first convert your $even into a timestamp (number of seconds past 1970).
That would work ...
--Joe
On Fri, Apr 06, 2001 at 01:13:59PM +0100, Matt Davis wrote:
> Hi I am trying to format a date extracted from my DB.
Something I almost always do when pulling dates from a mySQL table is
format the date column in the query itself using the mySQL function
DATE_FORMAT()...
At 01:13 PM 4/6/01 +0100, Matt Davis wrote:
>Hi I am trying to format a date extracted from my DB. I have run my query
>and then have used
Hi I am trying to format a date extracted from my DB. I have run my query
and then have used the following to get my row data
while ($row = mysql_fetch_array($sql_result)) {
$title = $row["message_title"];
$message = $row["message"];
$event
At 3:04 PM -0800 2/6/01, Richard Scott Crawford wrote:
>Cold Fusion has a wonderful function called CreateODBCDate(), which
>takes as an argument any date in just about any format and returns a
>standard ODBC date format that you can plug into a database without
>worrying about conversion.
>
>D
Cold Fusion has a wonderful function called CreateODBCDate(), which takes
as an argument any date in just about any format and returns a standard
ODBC date format that you can plug into a database without worrying about
conversion.
Does PHP have a similar function? I've looked for one but can
32 matches
Mail list logo