Re: Java String to date format

From: JD Uhler (
Date: 12/31/03

Date: 31 Dec 2003 08:28:41 -0800

While we are on the topic of dates.. are there any methods/properties
that tell you which fiscal year you are currently in? I was going to
create the whole "greater/less than July 1st" routine, but thought
there may be an easier way.

Thank you


John O'Conner <> wrote in message news:<FykIb.12158$>...
> JD Uhler wrote:
> > I want to convert the String "2001-09-07 00:00:00.0" into the format
> > "09/07/2001". How do I do that without having to do a bunch of string
> > manipulations? Can I use SimpleDateFormat to just convert it to a
> > string? I have tried that, but an error comes back saying something
> > like "Cannot convert Object to Date".
> >
> > The original String can be null as well.
> >
> > Thank you
> >
> > JD
> Another (easier/quicker) option is to use String's split() method to
> create an array containing the substrings "2001", "09", and "07". Now
> you can create a new String using these substrings. There are a few
> string manipulations, but they are simple.
> Regards,
> John O'Conner

Relevant Pages

  • Re: How to store a hidden value in a tree node ?
    ... > Dim s As String = DirectCast ... Mon cher MVP's ... I am puzzled by the design time help of the Tag ... methods/properties of an object, but with Tag I only receive GetType. ...
  • Re: WBEM time in VB.NET WQL SelectQuery
    ... Well, I do string manipulations now, but it is very strange, that this functionality is present in VBScript, and it's absent in .NET... ... > torgeir, Microsoft MVP Scripting and WMI, Porsgrunn Norway ...
  • Re: Can Turing machines do arithmetic?
    ... >>algebra as string manipulations, so don't see where the distinction ... > was an abstraction. ... > binary digits representing n. ...
  • Re: Strings as value objects
    ... language because then not everybody has to invent the wheel again. ... string manipulations are ubiquituous and often ... So a sound std lib better provide means ...
  • Re: Finding the position of a sub string within a strong
    ... another string if I know it's offset, ... How would I return the position of the sub string "zat" in the string ... You can perform some basic string manipulations in the shell itself, ...