I have a simple question about the Date object (or
similar object)
I have a mySQL table with a DATETIME cell. I
want to get the date from this cell
(formatted like so: e.g. 2001-03-23
13:04:59)
and retrieve the date that is exactly 7 days
earlier than the retrieved date.
What is th
I have a simple question about the Date object (or similar object)
I have a mySQL table with a DATETIME cell. I want to get the date from this
cell
(formatted like so: e.g. 2001-03-23 13:04:59)
and retrieve the date that is exactly 7 days earlier than the retrieved
date.
What is the easi
nt: den 6 april 2001
14:18To: [EMAIL PROTECTED]Subject: Dates in
Java
I have a simple question about the Date object
(or similar object)
I have a mySQL table with a DATETIME cell. I
want to get the date from this cell
(formatted like so: e.g. 2001-03-23
13:04:59)
a
try "select myDate - 7 from myTable;" in your SQL statement for a quick fix
:-)
(works on postgres, don't know about msql)
-Original Message-
From: Michael Wentzel [mailto:[EMAIL PROTECTED]]
Sent: Friday, April 06, 2001 12:58 PM
To: '[EMAIL PROTECTED]'
Subject: R
On Fri, 6 Apr 2001, Michael Wentzel wrote:
tc> For example,
tc> DateTest.java:20: cannot resolve symbol
tc> symbol : constructor Date ()
tc> location: class java.sql.Date
tc> Date d = new Date();
tc> ^
You got to explicitly tell which Date object you w
This is the way I would do it, which will allow it be
portable to any database.
Calendar c = Calendar.getInstance();
c.add(Calendar.DATE,-7);
//Connection is assumed
PreparedStatement stmt = conn.prepareStatement("select
* from sometable where somedatetimefield = ?");
stmt.setTimestamp(1,new
Ti
:-)
> (works on postgres, don't know about msql)
>
> -Original Message-
> From: Michael Wentzel [mailto:[EMAIL PROTECTED]]
> Sent: Friday, April 06, 2001 12:58 PM
> To: '[EMAIL PROTECTED]'
> Subject: RE: Dates in Java
>
> I have a simple question a
t; >
> > try "select myDate - 7 from myTable;" in your SQL statement for a quick
fix
> > :-)
> > (works on postgres, don't know about msql)
> >
> > -Original Message-
> > From: Michael Wentzel [mailto:[EMAIL PROTECTED]]
> > Sent:
On Fri, 6 Apr 2001, Ryan wrote:
> I have a simple question about the Date object (or similar object)
>
> I have a mySQL table with a DATETIME cell. I want to get the date from this cell
>
> (formatted like so: e.g. 2001-03-23 13:04:59)
>
> and retrieve the date that is exactly 7 days earlier th
t for a quick
> fix
> > > :-)
> > > (works on postgres, don't know about msql)
> > >
> > > -Original Message-
> > > From: Michael Wentzel [mailto:[EMAIL PROTECTED]]
> > > Sent: Friday, April 06, 2001 12:58 PM
> > > To: '[EMAIL PROTECTE
Responses like this scare
new programmers off the lists.
I remember my first post...
--jeff
- Original Message -
From: "Milt Epstein" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, April 06, 2001 7:05 AM
Subject: Re: Dates in Java
> On Fri, 6 Apr 2001
gt;
> To: <[EMAIL PROTECTED]>
> Sent: Friday, April 06, 2001 7:05 AM
> Subject: Re: Dates in Java
>
> > On Fri, 6 Apr 2001, Martin Mauri wrote:
> >
> > > Hey...don't be so rude, let the boys work their problems out...
> >
> > There is somethin
useful
and friendly) since I joined, so this probably isn't something to be
concerned about (on either side).
> - Original Message -
> From: "Milt Epstein" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Friday, April 06, 2001 7:05 AM
> Subject: Re
something to be
> concerned about (on either side).
>
>
> > ----- Original Message -
> > From: "Milt Epstein" <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>
> > Sent: Friday, April 06, 2001 7:05 AM
> > Subject: Re: Dates in Java
>
> Are we in the tomcat-user forum ???
> I don't see the relationship between a so simple constructor problem
> (which Javadoc solve quiet easily ...) and Tomcat ...
I agree that this list is not the place for this question(the proper
place would be java.sun.com JDC groups) but most of the time i
15 matches
Mail list logo