Article View: borland.public.jbuilder.java.language
Article #15444String To Date
From: Geoff Marshall
Date: Sat, 12 Jun 1999 00:00
Date: Sat, 12 Jun 1999 00:00
25 lines
1121 bytes
1121 bytes
As a new comer to JB can anybody help me convert a string to a date?
I have tried
Date myDate = Date(<string>);
---> Error "Date(jaa.land.string) not found..."
and also
Date myDate = DateFormat.parse(string);
---> Error "Variable DateFormat not found ..."
I have included the following:
import java.io.*;
import java.util.*;
import java.lang.*;
Also can anybody say what string formats are acceptable? I would like
to use d/mm/yyyy but could re-arrange these.
Thanks in advance for any assistance,
Geoff Marshall
Technical Details
Message-ID:
<3762CD95.5B8F5AAC@fsbdial.co.uk>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f74b3,3d8746921d3fd1df,start X-Google-Attributes: gidf74b3,public From: Geoff Marshall <gemsys@fsbdial.co.uk> Subject: String To Date Date: 1999/06/12 Message-ID: <3762CD95.5B8F5AAC@fsbdial.co.uk> X-Deja-AN: 488890503 Content-Transfer-Encoding: 7bit X-Accept-Language: en Content-Type: text/plain; charset=us-ascii Organization: GEMSYS Ltd Mime-Version: 1.0 Reply-To: aas20despam@dial.pipex.com Newsgroups: borland.public.jbuilder.java.language