Hi

First of all try to use datetime column for date&time storage porpouses.
create table datee(datetime today);
And then:
insert into datee(today) values(now());

After all of this, please RTFM :)). It's all written there.

Regards
____________________________________
Daniel Łaś
e-direct Polska sp. z o.o.
WWW: http://www.e-direct.pl
E-mail: [EMAIL PROTECTED]
45-072 Opole ul. Reymonta 45
tel. +48 77 44 26 073
fax. +48 77 44 26 074


> -----Oryginalna wiadomość-----
> Od: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> Wysłano: 7 września 2001 15:51
> Do: [EMAIL PROTECTED]
> Temat: sysdate() query and note to Mysql admin
>
>
>
> Hi,
> I my name is ryan and I own a small site which has a mysql
> database and servlet support.
>
> I have a simple query to all you mysql gurus...
> my table is very simple, i created a table with the following
> create table datee(int today);
>
> now,what statement do I use to put the sysdate into the column today?
> this is NOT working
> insert into datee values(select DAYOFMONTH(sysdate()));
> the reason why I am doing this is coz I need to get the current
> date into my java app and this is not working
>
> ....
> Statement statement;
> Resultset rs=statement.executeQuery("select DAYOFMONTH(sysdate())");
> if(rs.next())
> {rs.getString(sysdate());}
> .......
>
> does anyone know how to get the current date,month from the
> database into your java program?
>
> Please reply to [EMAIL PROTECTED] as I am unable to get into the mysql list.
> Any help appreciated.
> -Ryan.
>
> NOTE TO MySql admins
> --------------------
> Why in the world am I not able to get into the MySql list?
> my email is [EMAIL PROTECTED] and everytime I subscribe I get an
> error telling me that this is a perminant error and that its
> given up on it.
> Kindly help or manually include me into the list please.
>
> ---------------------------------------------------------------------
> Before posting, please check:
>    http://www.mysql.com/manual.php   (the manual)
>    http://lists.mysql.com/           (the list archive)
>
> To request this thread, e-mail <[EMAIL PROTECTED]>
> To unsubscribe, e-mail
> <[EMAIL PROTECTED]>
> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
>


---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to