473,399 Members | 3,656 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,399 software developers and data experts.

syntax error date_format


Hi,

What is wrong with this code ?

SELECT DATE_FORMAT( myfield, GET_FORMAT( TIMESTAMP, 'EUR' ) ) FROM T_TABLE;

regards

Johan
Jul 19 '05 #1
2 2856
Johan den Boer wrote:
Hi,

What is wrong with this code ?

SELECT DATE_FORMAT( myfield, GET_FORMAT( TIMESTAMP, 'EUR' ) ) FROM T_TABLE;


GET_FORMAT() is available as of MySQL 4.1.1. Perhaps you have older
version of MySQL?
Try something like:
SELECT DATE_FORMAT(myfield, '%a %M %Y %r') FROM T_TABLE;

Jul 19 '05 #2
Johan den Boer wrote:
Hi,

What is wrong with this code ?

SELECT DATE_FORMAT( myfield, GET_FORMAT( TIMESTAMP, 'EUR' ) ) FROM T_TABLE;


GET_FORMAT() is available as of MySQL 4.1.1. Perhaps you have older
version of MySQL?
Try something like:
SELECT DATE_FORMAT(myfield, '%a %M %Y %r') FROM T_TABLE;

Jul 19 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: Polar | last post by:
I am having troubles finding the parse error in this script. I've been checking for weeks. I am too new to the subject I guess. I am trying to show a readord and them have a form at the bottom...
0
by: Jimmy | last post by:
Hi, I'm new to MySQL and I have qustion regarding to CAST and Date_Format functions. I'm trying to convert a column 'Time' varchar(50) to datetime datatype by "select date_format(cast(time as...
2
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',...
3
by: Manuel | last post by:
I'm trying to compile glut 3.7.6 (dowbloaded from official site)using devc++. So I've imported the glut32.dsp into devc++, included manually some headers, and start to compile. It return a very...
3
by: adamalton | last post by:
I am trying to take a date in the format "YYYY-MM-DD" and get from it the month as a word (e.g. July) and the day as a 2 digit number (e.g. 24). I am trying to use the date_format function, (new...
16
by: laverdir | last post by:
<? $query = "SELECT " . $this->tabela3 . ".id, " . $this->tabela3 . ".naziv, " . $this->tabela3 . ".spisatelj, " . $this->tabela3 . ".najava, " . " DATE_FORMAT(" . $this->tabela3 ....
0
by: CtrlAltDel2008 | last post by:
Hello everyone, i hope you can help me with this query. The code below all works fine, referring to the SUBSTRING part, at the moment it just displays all the text from the "http" part until the end...
2
by: ann86 | last post by:
Hello, I am a newbie to PHP and I am working on a site that was created by someone else. The server was updated yesterday so now I am getting the error Fatal error: Cannot redeclare...
7
nathj
by: nathj | last post by:
Hi, I'm new to ASP, I normally develop in PHP but this little project requires me to use ASP. Being a newbie in this I've run into some difficulty. I'm modifying code from a third party....
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
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...
0
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...

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.