Use "MM/dd/yy" instead of "mm/dd/yy" !! See Java 2 docs.

Robin Karatra,
Fidelity Investments

> -----Original Message-----
> From: Steve [SMTP:[EMAIL PROTECTED]]
> Sent: Friday, July 16, 1999 11:05 AM
> To:   [EMAIL PROTECTED]
> Subject:      [ND] Date Format
> 
> 
> 
>       I am having trouble formatting a date.  I get a date entered in a 
> display field and find the prior 6 days. 
>       The date is entered in the format mm/dd/yy.  This date entered in
>  the displayfield formatss  ok, but Date2, Date3, etc. come out in the 
> Long format.  I tried the format type in ND and I tried 
> java.text.SimpleDateFormat("mm/dd/yy") and it worked except the month
>  was always 00.   (00/01/99)
> 
> CODE
> //get the date entered on the screen
> String Datex = getDisplayFieldValue("tbDateEntered").toString;
> 
> //get the prior 6 days
> Date Date2 = new Date(Datex.getYear(),Datex.getMonth(),Datex.getDate() -
> 1);
> Date Date3 = new Date(Datex.getYear(),Datex.getMonth(),Datex.getDate()-
> 2); 
> ....ETC.                                                
> Any idea on how to format my output to mm/dd/yy in Date2, Date3,...?
> Thanks,
> Steve
> _________________________________________________________________________
> 
> For help in using, subscribing, and unsubscribing to the discussion
> forums, please go to: http://www.netdynamics.com/support/visitdevfor.html
> 
> For dire need help, email: [EMAIL PROTECTED]
_________________________________________________________________________

For help in using, subscribing, and unsubscribing to the discussion
forums, please go to: http://www.netdynamics.com/support/visitdevfor.html

For dire need help, email: [EMAIL PROTECTED]

Reply via email to