rsøyen [mailto:karlar...@gmail.com]
> Sent: Wednesday, July 24, 2013 7:02 AM
> To: MySQL Mailinglist
> Subject: From DATE_FORMAT and back to origin date in mysql date column
>
> SELECT DATE_FORMAT(dato, '%e/%c/%Y') AS dato FROM transportdokument WHERE
> dato >= '2
SELECT DATE_FORMAT(dato, '%e/%c/%Y') AS dato FROM transportdokument WHERE
dato >= '2013-07-20' AND dato <= '2013-07-24' GROUP BY dato DESC is working
perfect in my PHP file.
But I need to transfer the date back from my norwegian formatted date to
t; CC: mysql@lists.mysql.com
> Subject: Re: DATE_FORMAT parameter question
>
> If you'll excuse the shameless plug: I once created a tool to help find
> the exact parameters to use for PHPs date() and MySQLs DATE_FORMAT().
> Please see
>
> http://bitbybit.dk/php/dat
If you'll excuse the shameless plug: I once created a tool to help find
the exact parameters to use for PHPs date() and MySQLs DATE_FORMAT().
Please see
http://bitbybit.dk/php/date_format/
(Yes, it looks horrible. But it works)
/ Carsten
Martin Gainty skrev:
Good Afternoon All
foll
> To: mysql@lists.mysql.com
> From: j...@consultorweb.cnt.br
> Subject: Re: DATE_FORMAT parameter question
> Date: Fri, 9 Apr 2010 12:56:46 -0300
>
> Basicay, your date_format works like:
>
> select DATE_FORMAT('YY-MM-DD','%y-%b-%d') from DUAL
Basicay, your date_format works like:
select DATE_FORMAT('YY-MM-DD','%y-%b-%d') from DUAL;
"Martin Gainty" escreveu na mensagem
news:blu142-w2137936b18ae273dbd6cb1ae...@phx.gbl...
Good Afternoon All
following the documentation available at
http://dev.mysql.
Good Afternoon All
following the documentation available at
http://dev.mysql.com/doc/refman/5.1/en/date-and-time-functions.html
i wish to select a date using DD-MON-YY format but my format of '%y-%b-%d'
appears to be incorrect
mysql> select DATE_FORMAT('11-10-09'
Hello mysql list,
As is very often the case, five minutes after I posted this, I found
the problem or solution, not sure it was the "problem" as I am not
convinced that mysql ought to get confused so easily. I changed
DATE_FORMAT( `Messages`.`Date`, '%D %M %Y' ) AS Date,
DA
Hello mysql,
I have a PHP script that is running the following query:
SELECT `Messages`.`ID`,
`Messages`.`Sender`,
`Messages`.`Subject`,
DATE_FORMAT( `Messages`.`Date`, '%D %M %Y' ) AS Date,
LEFT(`Messages`.`Text`, 200 ) AS Preview,
`Messages`.`New`,
`Profiles`.`NickName`,
`Profiles`
RE: Import Access Data...
> I'll try and import using ODBC. Is there any good web sites
> about ODBC and its operations that I can learn about it?
>
> Scott
If you haven't found this by now:
http://forums.mysql.com/list.php?65 - MySQL forum for Access conversion.
Many people use ODBC to migra
ect date_format('2004-10-03 15:06:14','%m/%d/%y %T');
How do I create a table using:
date_format('2004-10-03 15:06:14','%m/%d/%y %T');
That way I can import Access Data?
--
Power to people, Linux is here.
--
MySQL General Mailing List
For list archives:
Thanks! I'll try and import using ODBC. Is there any good web sites
about ODBC and its operations that I can learn about it?
Scott
On Mon, 07 Mar 2005 09:26:56 +1100, Daniel Kasak
<[EMAIL PROTECTED]> wrote:
> Scott Hamm wrote:
>
> >How do I create a table using:
>
Scott Hamm wrote:
How do I create a table using:
date_format('2004-10-03 15:06:14','%m/%d/%y %T');
That way I can import Access Data?
Can't do that.
You can import Access data via ODBC - that way the driver figures out
how to send the data to MySQL.
I assume you are t
How do I create a table using:
date_format('2004-10-03 15:06:14','%m/%d/%y %T');
That way I can import Access Data?
--
Power to people, Linux is here.
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
fixturedate
which works fine, and I'm able to output the result of the SQL without
problem.
If that query is changed to:
SELECT DISTINCT fixturedate,
MONTH(fixturedate) AS CalMonth,
DATE_FORMAT(fixturedate, '%d a%') AS testing
FROM Fixtures
ORDER BY fixturedate
Cold
If you need the date like, '2004/01/01', then shouldn't it be '%Y/%m/%d'?
You still ahve the dashes (the '-' character) in your date-format, and you
need a forward-slash (the '/' character) instead.
Here's what I ran on
I have the following query where the user will put in a date. They will
put it in like '01/01/04'. I use this date in my WHERE clause but MySQL
needs the date like '2004/01/01'. I tried using Date_Format('04/01/01',
'%Y-%m-%d') to change the way it is fo
: Issue with DATE_FORMAT() call returning wrong
year
Hello all,
I have a query that for some reason is now returning
the incorrect year. First here is my server
configuration.
Windows 2003 Advanced server
MySQL version 4.0.15-nt
Here is my SQL statement:
SELECT
DATE_FORMAT(E.DateTime, '
Try %Y instead of %X
-Original Message-
From: PAUL MENARD [mailto:[EMAIL PROTECTED]
Sent: Monday, January 05, 2004 10:08 AM
To: [EMAIL PROTECTED]
Subject: Issue with DATE_FORMAT() call returning wrong
year
Hello all,
I have a query that for some reason is now returning
the incorrect
Hello all,
I have a query that for some reason is now returning the incorrect year. First here is
my server configuration.
Windows 2003 Advanced server
MySQL version 4.0.15-nt
Here is my SQL statement:
SELECT
DATE_FORMAT(E.DateTime, '%X-%m-%d %h:%i:%s %p' ) AS DateTime,
E.Se
Hi, i have a problem with getting the right return values from field purrdato.
All records exept a few are set with date and the rest is NULL. The field allows Null
values. when using: DATE_FORMAT(purrdato, '%d.%m.%Y') AS purrdato ...it even
returns '00.00.' on nul
Okay, here's an interesting one. Here's the query:
SELECT distinct date_format(auditdate, "%Y%M" ) as listUrl, date_format(
auditdate, "%Y%m" ) as blank
FROM quality_history
WHERE auditdate <> Now()
ORDER BY listUrl desc
LIMIT 6
audi
Hello Steve,
Steve Vernon wrote on 22.10.2003 16:47
I suppose I could return the month as a number, and then output the text
from that, but this seems a bit tacky!
I think that's the most reliable way, imagine you move to a new server
or install your software somewhere else . . . I got
Look in your my.ini file.
There's maybe an entry:
language=f:/mysql/share/german
Set it to your favourit language!
Bernhard
- Original Message -
From: "Steve Vernon" <[EMAIL PROTECTED]>
To: "Mysql List" <[EMAIL PROTECTED]>
Sent: Wednesday, October
Hello,
I have read and searched the internet, but I cannot find much on getting
mysql to return German and other languages months. Is there codes you use?
I really would prefer to use the English MySQL (if there is such a one) as I
don't know much German, and need the error messages in English!
Thanks very much Robert, that worked. I was surprised at the effect of
the '*'.
Best regards,
Nicole
Robert Kostko wrote:
Hi, Nicole
IMHO after * all additional field statements "DATE_FORMAT(date_rec,'%Y-%m-%d %T')" are ignored. Try to list all neccessary f
I am trying to format a TIMESTAMP column on output by using the
DATE_FORMAT() function:
Can someone tell me why this does not change the format - no error
message - just does not do anything?
$sql = "SELECT * from arviContacts WHERE fid=$zz AND
DATE_FORMAT(date_rec,'%Y-%m-%d %T
mply strip out the year for the date it would be '01', but if you wrap
> the week number, you shouldn't you increment the year as well? SELECT
> DATE_FORMAT('2001-12-31', '%v-%y'); returning '01-01&
7;, but if you wrap
the week number, you shouldn't you increment the year as well? SELECT
DATE_FORMAT('2001-12-31', '%v-%y'); returning '01-01' is inaccurate to say
the least.
%x and %X have the same problem as %v (since they use it).
>Don't really kno
mysql is showing the right year and php is showing the wrong year ( xx-01
is right )
> Here's the an example (the second one is not what I'd expect):
>
> SELECT DATE_FORMAT('2001-12-25', '%v-%y');
> +-
an example (the second one is not what I'd expect):
SELECT DATE_FORMAT('2001-12-25', '%v-%y');
++
| DATE_FORMAT('2001-12-25', '%v-%y') |
++
| 52-01
Hello All,
I want to convert the string '18 October 2002' to the date format
'2002-10-18' using MySQL.
Essentially this is the reverse of the DATE_FORMAT(date,format) function.
I'm pretty sure it can't be done but does anyone out there have any idea
On 3 Oct 2002, at 15:33, Mark Colvin wrote:
> The problem I am having is with the DATE_FORMAT. Running the above query
> returns the following for the width column.
>
> 94.40 DATE_FORMAT(d1.created, '%d-%m-%Y'): NULL DATE_FORMAT(d1.amended,
> '%d-%m-%Y'): 0
, d1.width, DATE_FORMAT(d1.created,
'%d-%m-%Y'), DATE_FORMAT(d1.amended, '%d-%m-%Y'), d2.extdescr from decheader
as d1, decextdescr as d2 where d1.code = d2.code and d1.code = '00042'
The problem I am having is with the DATE_FORMAT. Running the above query
return
Hi,
This might be a strange question, but can you do date_format when you do a
myrow? Or does date_format as always have to be done in a sql statement?
Does anyone have an easy of doing dates?
Chuck Payne
Magi Design and Support
Radoslaw,
Thursday, June 13, 2002, 4:03:08 PM, you wrote:
RK> I run mysql3.23.49/myisam with linux 2.4.18/libc2.2.5.
RK> Some time ago I've hardware crash. Myisamchk didn't report
RK> any problems but after some time mysql got SIGSEGV.
[skip]
Can you send me binary files of your table for testi
Hi
I run mysql3.23.49/myisam with linux 2.4.18/libc2.2.5.
Some time ago I've hardware crash. Myisamchk didn't report
any problems but after some time mysql got SIGSEGV.
>From that time mysql finished with SIGSEGV in the same place
a few times.
0x80cb554 handle_segfault__Fi + 428
0x40021f54 _end +
Subject: date_format question
Hi,
I have a quick question concerning date/time functions. If I query
MySQL:
SELECT date_format(date, '%W %M %e %Y') FROM experiments where
expid=3706
It returns: Wednesday May 2 1979
Are there existing methods for determining whether to add &qu
Hi,
I have a quick question concerning date/time functions. If I query
MySQL:
SELECT date_format(date, '%W %M %e %Y') FROM experiments where
expid=3706
It returns: Wednesday May 2 1979
Are there existing methods for determining whether to add "st", "nd"
Neil,
> I appear to be having an error with the following update that I am
> submitting to my database. I am using mysql's DATE_FORMAT function to pull
> the date out and insert in a user friendly form. Upon submission of the
> modified data, I use the below SQL to update the
I appear to be having an error with the following update that I am
submitting to my database. I am using mysql's DATE_FORMAT function to pull
the date out and insert in a user friendly form. Upon submission of the
modified data, I use the below SQL to update the table information.
Everythi
unting & CRM
us.logiledger.com
- Original Message -
From: "julian haffegee" <[EMAIL PROTECTED]>
To: "MySQL General List" <[EMAIL PROTECTED]>
Sent: Monday, December 31, 2001 2:55 PM
Subject: Re: date_format
> Thanks this works
>
> the difference
m/ but can find no mention. Am I searching
for the wrong thing? I searched for AS in the documentation
thanks again Jules
>
> You may want to try:
>
> $result = mysql_query("SELECT title, description, url, author,
> date_format(datefield, '%M
> #2 All I have read on the web/books suggests that this is what to do
> $result = mysql_query ("SELECT title, description, url, author,
> date_format(datefield, %M %D %Y') FROM documents");
>
> This just leaves out all dates.
You may want to try:
$resu
All I have read on the web/books suggests that this is what to do
$result = mysql_query ("SELECT title, description, url, author,
date_format(datefield, %M %D %Y') FROM documents");
This just leaves out all dates.
Can anyone see where I'm go
7-19 14:00:00'
>
>
>Somehow your sample data doesn't look right: shouldn't it be
>
> >>'2001071614' '2001-07-16 14:00:00'
> ^
exactly this is the bug!
the date at this time was: '2001-07-19 14:00:00' a
At 09:40 19.07.2001 -0400, you wrote:
>You're correct, likely not a timezone problem.
>
>Have you confirmed that the clocks on these machines are
>synchronized? That they aren't really three days off?
yep, again and agein :)
the clocks are in sync +/- 5 secs
> >okay, i see this output on m
At 09:25 19.07.2001 -0400, you wrote:
>Probably due to timezone setting differences between the two
>client machines.
i also thought about that, but there are 2 DAYs difference... can this be a
timezone issue ?
>okay, i see this output on my sco-machine:
>'2001071614' '2001-07-19 14:00:00'
>
>
Hi!
i've mysql-3.23.39-nt on winnt with a client running under SCO 3.2
i've a simple querry with date_format in it, but date_format isn't doing
what i expect...
sql_string: "select date_format(c.hour, '%Y%m%d%H'), c.hour from count c"
c.hour is DATETIME
I think your doing FAR more work than you need to. I'm also not getting
what you mean by it not paying attention to the initial query.
I suggest you combine those 3 queries into one, just like this:
SELECT somefield1, somefield2, DATE_FORMAT(EventStartDate, '%W %M
Hi,
I've developed a simple search engine for a site I'm working on. Its
purpose is to display community events based on the users input criteria.
The problem is, if I use the DATE_FORMAT command to alter the appearance of
the events dates and times - then MySQL begins at the top o
;value. It is probably best explained with a query.
>
>This is what I am trying to do:
>
>SELECT whatever FROM tbl1, tbl2
>WHERE ( tbl1.registration_date >=
>"DATE_FORMAT(now(),'%Y-%m-)DATE_FORMAT(tbl2.registration_date,'%d')"
>AND tbl1.registratio
am trying to do:
SELECT whatever FROM tbl1, tbl2
WHERE ( tbl1.registration_date >=
"DATE_FORMAT(now(),'%Y-%m-)DATE_FORMAT(tbl2.registration_date,'%d')"
AND tbl1.registration_date >= DATE_FORMAT(now(),'%Y-%m-%d') ) AND
tbl2.id=1000
So both tables have their
1.
>
>Through the command line, I know I do this by typing:
>select DATE_FORMAT(EventStartDate, '%M %D %Y');
>
>My question is how would i get this information to display via PHP?
The same way. Issue a query that uses DATE_FORMAT() rath
$Result = @mysql_query ("SELECT DATE_FORMAT(EventStartDate,'%M %D %Y') AS
EventStartDate FROM EventsTable");
$Row = mysql_fetch_array($Result);
printf("Event Date:%s", %Row['EventStartDate'];
Hope this helps :o)
--Patrick
# -Original Message-
Hi Tim!
You could do something like this:
$sqlstr = "select date_format(EventStartDate, '%M %D %Y') as mydate, (rest of your
SQL string here)" ;
$result = mysql("mydb", $sqlstr, $connect) ;
$myformatteddate = mysql_result($result, 0, 'mydate'
-MM-DD, I'd like to
display them in a more user friendly format. For example, there is an
event taking place this Wednesday, in ISO 2001-05-30 - I'd like it to
display as May 30th, 2001.
Through the command line, I know I do this by typing:
select DATE_FORMAT(EventStartDate,
Paul Schreiber writes:
> Sinisa Milivojevic wrote:
>
> Column start is of type TIME. The actual values are illustrated above in
> the example.
>
> Paul
>
Hi!
Then it is not a bug. As our manual clearly points out, date_format
can be used only on date and datetime co
Sinisa Milivojevic wrote:
>[EMAIL PROTECTED] writes:
>> >Description:
>> date_format is setting times to 12:00 AM; time_format works fine
>> >How-To-Repeat:
>> mysql> select start,TIME_FORMAT(start, '%l:%i %p') AS start2 FROM time;
>
[EMAIL PROTECTED] writes:
> >Description:
> date_format is setting times to 12:00 AM; time_format works fine
> >How-To-Repeat:
> mysql> select start,TIME_FORMAT(start, '%l:%i %p') AS start2 FROM time;
> +--+--+
> | start| start2 |
&
>Description:
date_format is setting times to 12:00 AM; time_format works fine
>How-To-Repeat:
mysql> select start,TIME_FORMAT(start, '%l:%i %p') AS start2 FROM time;
+--+--+
| start| start2 |
+--+--+
| 12:00:00 | 12:00 PM |
|
name
ID and a datetime column named DATE..
But you are right that it is probably reserved for some stuff..
The DATE_FORMAT can indeed be left out, but I once understood that this was
more save to do..???
I never asked why, but also never had any problems..
I found the source of my problem.. The
First off, I don't think you should use 'date' as a column name; isn't it
a reserved word?
Then, hmm.. is that column a DATE column, or DATETIME, or TIMESTAMP?
If it is DATETIME or TIMESTAMP, then you don't really need the DATE_FORMAT()
conversion; compaing a DATETIME or
= perfect_customer_orders.id where
((perfect_customer_productorders.date) >= DATE_FORMAT( DATE_SUB( NOW() ,
INTERVAL 30 DAY ) , '%Y-%m-%d' ) and perfect_customer_productorders.ordernr
= 'te-004' and perfect_customer_orders.status != 2) GROUP BY
perfect_customer_productorders.or
Hello Cindy,
I posted this in response to another date formatting question, hope it
helps.
The link should be helpful if you haven't found it already.
SELECT fields, DATE_FORMAT(datefield, '%M %d, %Y');
I just looked it up myself...It's all in the manual at:
http://w
name, %d might stand for day number,
>etc.
I would really like a complete list of the available %'s in this
function. I thank you all for your help, but I still think that
entering DATE_FORMAT in the documentation search box at www.mysql.com
should have been successful.
(I'm specific
Hi Cindy,
This might help... http://www.upan.org/rtfm/strftime.html
Cheers,
Mikel
Cindy wrote:
> OK. I went to the documentation at www.mysql.com and typed in
> DATE_FORMAT in the search box, hopefully find a list of the %M's, etc
> rules that may be used (I'd like Dec
On Wed, 17 Jan 2001, Pavel Kveton wrote:
> On Wednesday 17 January 2001 00:20 Cindy wrote:
> > OK. I went to the documentation at www.mysql.com and typed in
> > DATE_FORMAT in the search box, hopefully find a list of the %M's, etc
> > rules that may be used (I'
On Wednesday 17 January 2001 00:20 Cindy wrote:
> OK. I went to the documentation at www.mysql.com and typed in
> DATE_FORMAT in the search box, hopefully find a list of the %M's, etc
> rules that may be used (I'd like December to become Dec, etc). No
> dice. Randomly lo
Cindy writes:
>
> OK. I went to the documentation at www.mysql.com and typed in
> DATE_FORMAT in the search box, hopefully find a list of the %M's, etc
> rules that may be used (I'd like December to become Dec, etc). No
> dice. Randomly looking through sections
Try the manual contents, linked from the documentation page
http://www.mysql.com/documentation/mysql/bychapter
> OK. I went to the documentation at www.mysql.com and typed in
> DATE_FORMAT in the search box, hopefully find a list of the %M's, etc
> rules that may be used (I'
OK. I went to the documentation at www.mysql.com and typed in
DATE_FORMAT in the search box, hopefully find a list of the %M's, etc
rules that may be used (I'd like December to become Dec, etc). No
dice. Randomly looking through sections that came up under "DATE"
search di
72 matches
Mail list logo