473,569 Members | 2,759 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

problem in mysql date_format

83 New Member
Hi

In my table the date format is changed to 06-feb-2007.The query i execute is

select date_format(col .name,"%e-%b-%Y") from tablename;

This is worked well in local but in the web it will give the error. If we change the %b to %m ,its worked as both local and web also .but i want the date in format of 06-feb-2007. What can i do for this .Please any one help to do that in web.

Thanks in Advance
Sang
Feb 6 '07 #1
1 1869
ronverdonk
4,258 Recognized Expert Specialist
What do you mean by "In my table the date format is changed to 06-feb-2007"?
06-feb-2007 is not a date format, it is only the representation of a date.

So the question is: what is the data type of your date column?

Ronald :cool:
Feb 6 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

5
3027
by: Ricki Susic | last post by:
$result = mysql_query("SELECT ID, tekst, date_format(dato, '%Y %m %d') FROM henriks ORDER BY ID DESC LIMIT 0,3"); Why doesn't my date show when I print the result? Ricki
8
1780
by: JDJones | last post by:
I am entering some older things in a database for the first time. Included in the information I need to enter is the month and year the item was submitted. Ideally I'd like to be able to enter the old dates into a field like 03/98 or 12/02 or and still be able sort them by descending or ascending order. Is there a relatively easy way to do...
2
1526
by: Phil Nospam | last post by:
Hello all, I was browsing through the reference manual on the mysql.com web site and found the following code examples for some date/time functions: mysql> SELECT STR_TO_DATE('00/00/0000', '%m/%d/%Y'); -> '0000-00-00' mysql> SELECT STR_TO_DATE('04/31/2004', '%m/%d/%Y'); -> '2004-04-31'
2
1608
by: Ray in HK | last post by:
I have a table that have a date field as the pri key. Now I want to update the record that is last record for each month. Is it possible to do it in 1 single SQL statement ? table t d_Date date PRIMARY KEY, field1 int what i want is
4
1563
by: svein.tjonndal | last post by:
I have the following query: select DATE_FORMAT(accountingdate,"%c") as month,sum(totalprice - freightcost - insurancecost - vat2 - vat3 - vat4) as totalprice from invoice where cancelled=0 and deliveryagentid=0 and (employeeid=0 or employeeid=37 or employeeid=53 or employeeid=50) and DATE_FORMAT(accountingdate,"%Y")="2005" group by month...
2
6768
by: vncntj | last post by:
I'm trying to get the venue in the 'List' column when in contains a value. But if the venue Is Null then place the event in the 'List' SELECT CASE WHEN event Is Null THEN venue Else event End as 'List' ,DATE_FORMAT(fld_date, '%M') as Monthly
0
2005
by: xkp | last post by:
i am having problems with this query which worked perfrcly on mysql 3.0. It is able to extract dowloaders from a table and group them by date. select count(*) AS downloaders, date_format(date,'%Y-%m-%d') AS Datesmall, date_format(date,'%D %M %Y') AS Date from downloaders Group By date_format(date,'%D %M %Y ') order by...
16
2393
by: laverdir | last post by:
<? $query = "SELECT " . $this->tabela3 . ".id, " . $this->tabela3 . ".naziv, " . $this->tabela3 . ".spisatelj, " . $this->tabela3 . ".najava, " . " DATE_FORMAT(" . $this->tabela3 . ".vrijeme_stavljanja, '%e. %c. %Y. %k:%i') FROM " . $this->tabela3 . ", " . $this->tabela2 . " AS xref WHERE " . $this->tabela3 . ".id=xref.spis_id AND...
4
2415
by: Michael Sharman | last post by:
Hi guys, I'm a little confused with dates. Ok, all I want to do is store a date in MySQL as a datetime object and be able to read and format it using PHP. My datatype in MySQL is DATETIME and I'm inserting a date using the MySQL function now(). So far so good. When I var_dump() the value from the database it says it's a string,
3
3529
by: janetopps | last post by:
I have a news website, with asp pages, which was on Access, and i upgraded to MySQL, i used Bullzip to transfer the data. It had about 1000 pages, which im now able to pull up on the public side. Im sorting out a few glitches though. Since i upgraded from ms access database to MySQL, i have added about 4 articles to test the new setup. I note...
0
8122
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7673
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7970
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6284
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5513
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5219
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
1
2113
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1213
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
937
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.