🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.language
Article #20038

dates - invalid conversion!!

#20038
From: Bryan Chalmers
Date: Wed, 05 Nov 1997 00:00
21 lines
928 bytes
I have the following piece of code is supposed to format a date (d) as
dd/mm/yyy             

System.out.println("date before is " + d);
SimpleDateFormat df = new    SimpleDateFormat("dd/MM/yyyy");
System.out.println("date after is " + df.format(d));

This gives the following output.
date before is 1958-11-20
date after is 19/11/1958

I seem to have lost a day in the conversion. Can anyone tell me what I
am doing wrong?


Regards,
Bryan Chalmers
Texaco North Sea (UK) Company
Aberdeen
chalmbr@texaco.com
Technical Details
Message-ID: <3460a708.11625096@forums.borland.com>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f74b3,aa85914ad822cd30,start
X-Google-Attributes: gidf74b3,public
From: chalmbr@texaco.com (Bryan Chalmers)
Subject: dates - invalid conversion!!
Date: 1997/11/05
Message-ID: <3460a708.11625096@forums.borland.com>
X-Deja-AN: 287229905
Organization: Texaco North Sea (UK) Company
Newsgroups: borland.public.jbuilder.java.language