Dear List,

It's been a long, long time since I've used mysql and I happen to need
to work with dates. Amongst my many, demanding requirements is the
ability to enter a literal date. My attempts thus far have been less
than encouraging:

mysql> select cast('2004-01-01' as date);
ERROR 1064: You have an error in your SQL syntax near '('2004-01-01' as
date)' at line 1
mysql> select convert('2004-01-01' as date);
ERROR 1064: You have an error in your SQL syntax near '('2004-01-01' as
date)' at line 1
mysql> select convert('2004-01-01',date);
ERROR 1064: You have an error in your SQL syntax near
'('2004-01-01',date)' at line 1
mysql> select cast('2004-01-01',date);
ERROR 1064: You have an error in your SQL syntax near
'('2004-01-01',date)' at line 1
mysql> 

And this is the version it claims to be:

$ mysql --version
mysql  Ver 11.18 Distrib 3.23.58, for pc-linux-gnu (i686)

I've looked at http://dev.mysql.com/doc/mysql/en/Cast_Functions.html and
a bunch of other pages @ mysql.com. None of the examples seem to work on
mysql 3 (It seems that the mysql.com docs refer to mysql 4).

Any ideas?

Thanks all,

James.

-- 
James Gregory <[EMAIL PROTECTED]>

Attachment: signature.asc
Description: This is a digitally signed message part

-- 
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html

Reply via email to