www.php.net/date will show you all the possibilities of formatting the date
bastien
> Date: Sat, 22 Dec 2007 17:54:07 +0600
> From: [EMAIL PROTECTED]
> To: php-db@lists.php.net
> Subject: [PHP-DB] date format problem
>
> my problem i
my problem is with date format
mysql support -mm-dd
but my client not use to enter date in -mm-dd format
he use to in dd-mm-yyy format
how can it possible to input date in
dd-mm- format
>
> I have a field in my mysql db wich is a timestamp with the format
>
> mmddhhmmss
>
> and I would like to display it like:
>
> dd/mm/
>
http://www.mysql.com/doc/en/Date_and_time_functions.html#IDX1333
SELECT DATE_FORMAT(timestamp_col_name, '%d/%m/%Y') FROM table_name
--
PHP Datab
Hello,
I have a field in my mysql db wich is a timestamp with the format
mmddhhmmss
and I would like to display it like:
dd/mm/
how do I do that?
Thank you in advance,
Dani
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version
$query = mysql_query("SELECT UNIX_TIMESTAMP(fieldname) AS date WHERE id = '1';");
$array = mysql_fetch_array($query);
$mydate = date("j F, Y",$array[date]);
Change fieldname and the where clause, and that should work.
If you want to further munipulate how it looks, just look at the
dat
ewson
s.utk.edu>cc: "'[EMAIL PROTECTED]'"
<[EMAIL PROTECTED]>
Subjec
strftime()
offers a lot of formatting options for dates.
Hope it helps.
RUBANOWICZ Lisa wrote:
Hi All, I have a date format of -MM-DD in MySQL and am showing it on a PHP page. However I want to show it as
"2 February, 2003"
or "2 February"
Can someone please help me. The date will not ne
Hi All, I have a date format of -MM-DD in MySQL and am showing it on a PHP page.
However I want to show it as
"2 February, 2003"
or "2 February"
Can someone please help me. The date will not necessarily be todays date (I looked at
the datetime() function and the getdate() function but coul
That did it thanks
"Andrey Sosnitsky" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hello, CrossWalkCentral.
>
> You wrote 23 ñåíòÿáðÿ 2002 ã., 2:05:38:
>
> So, explode() requires a seperator as a first argument.
> You code is
>
> $date= "10-01-2002";
> list
Hello, CrossWalkCentral.
You wrote 23 ñåíòÿáðÿ 2002 ã., 2:05:38:
So, explode() requires a seperator as a first argument.
You code is
$date= "10-01-2002";
list ($day, $month, $year) = explode("-", $date);
echo "$year-$month-$day";
See PHP manual at http://www.php.net/manual/en/function.explode.
What if
$date="10-02-2002";
I tried it this way and the explode causes problems with the - in it
What would be the best way to deal with this should i just parse out the -?
"Andrey Sosnitsky" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hello CrossWalkCent
Hello CrossWalkCentral,
Sunday, September 22, 2002, 7:06:18 AM, you wrote:
Try this
$date= "10 01 2002";
list ($day, $month, $year) = explode(" ", $date);
echo "$year-$month-$day";
C> I am having problems coverting the followign date format. Does any one have
C> any insight on this.
C> $date=
I am having problems coverting the followign date format. Does any one have
any insight on this.
$date= 10 01 2002
I need to conver this to Y-m-d
any help would be great
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
e-
> From: fabrizio [mailto:[EMAIL PROTECTED]]
> Sent: Monday, June 10, 2002 9:01 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP-DB] date format display
>
>
> Hello dear all,
>
> in my mysql-db I have a date_tbl with this format: (20020531).
> how is possible in PHP
on 6/10/02 9:00 AM, fabrizio at [EMAIL PROTECTED] appended the following bits
to my mbox:
> in my mysql-db I have a date_tbl with this format: (20020531).
> how is possible in PHP do display date_tbl's values in a more human-readable
> format like 05-31-2002 or 31/05/2002 ?
In your query, yo
This function will fix your date display.
$sqldate="20020531";
$sqldate= fixdate($sqldate);
function fixdate($data){
$aux="";
$z=0;
for($i=0; $i wrote: Hello dear all,
in my mysql-db I have a date_tbl with this format: (20020531).
how is possible in PHP do display date_tbl's values in a
Monday, June 10, 2002, 2:00:59 PM, you wrote:
> in my mysql-db I have a date_tbl with this format: (20020531).
> how is possible in PHP do display date_tbl's values in a more human-readable
> format like 05-31-2002 or 31/05/2002 ?
Look at date and strtotime...
http://www.php.net/date
http:/
Hello dear all,
in my mysql-db I have a date_tbl with this format: (20020531).
how is possible in PHP do display date_tbl's values in a more human-readable
format like 05-31-2002 or 31/05/2002 ?
thaks in advance,
regards
fabrizio
--
PHP Database Mailing List (http://www.php.net/)
To
s A", date("U")+18000);
this one takes the number seconds of seconds between
the Unix Epoch (January 1 1970) and the currend time and adds 5 hours (18000
seconds)
Hope this helps
Dobromir Velev
-Original Message-
From: Matt Nigh <[EMAIL PROTECTED]>
To: php-db <[E
try "H" as your hour format (date("H")+5)
although out of interest, at 9:51am, using either "g" or "H" gives me 2:51
pm
HTH
/beau
// -Original Message-
// From: Matt Nigh [mailto:[EMAIL PROTECTED]]
// Sent: Wednesday, 28 November 2001 9:48 AM
hi,
i'm wondering if anyone could help me in formatting a date so it is 5 hours ahead of
the server time.
here's the code i'm using but it doesn't seem to work:
$date = date("F dS, Y g:i:s A",
mktime(date("g")+5,date("i"),date("s"),date("m"),date("d"),date("Y")) );
i've already looked in the m
[EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On
> Behalf Of system
> Sent: Saturday, July 14, 2001 5:17 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP-DB] Date Format
>
>
> Friends,
> I have a design, up and running scripts connected to MySQL.
> How do I retrieve date formats an
That should do it =>
Good luck!
Ben
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] On Behalf
Of system
Sent: Friday, July 13, 2001 8:17 PM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] Date Format
Friends,
I have a design, up and running scripts connected to My
Friends,
I have a design, up and running scripts connected to MySQL.
How do I retrieve date formats and have it displayed as dd-mm- ?
I store them as DATE.
CK Raju
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail:
Hi
Have a look in Books Online - the e-docs for MSSQL - search for the convert
function and all will be revealed.
Peter
- Original Message -
From: "Jack" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, July 19, 2001 5:49 PM
Subject: [PHP-DB] Date for
How I can format date in php query from MSSQL?
Jack
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]
Hello all,
I'm on the last leg of a project I'm doing, and maybe I'm just too fried
but I've tried several things. Can anyone help:
I've created an Event Listing form. The script pulls the table names from
the DB and preg's them to create the field names for the form. Any field
name that contain
27 matches
Mail list logo