velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From htila tha <aungpi...@yahoo.com>
Subject Re: I need help with date format
Date Thu, 08 Nov 2007 09:06:46 GMT
Hi,

Might not be good. But it works.
      SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMdd");
      SimpleDateFormat sdfa = new SimpleDateFormat("dd-MM-yyyy");
   
      int idate = 20071101;
      String sdate = new String(idate+"");
      java.util.Date ddate = sdf.parse(sdate, new ParsePosition(0));
      System.out.println(sdfa.format(ddate));
  rgds

JoseBovet <jose.bovet@gmail.com> wrote: 
hi guy's


I have a  problem with a date format, 
I need format a Integer to Date  or Integer to String
a example:

int number1 20070101 to date format (01-01-2007)
or

int number1 20070101 to String format (01-01-2007)

number1 is get for  method in a DB oracle!!!


greetingsĀ°



-- 
View this message in context: http://www.nabble.com/I-need-help-with-date-format-tf4767519.html#a13636581
Sent from the Velocity - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@velocity.apache.org
For additional commands, e-mail: user-help@velocity.apache.org



 __________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 
Mime
  • Unnamed multipart/alternative (inline, 8-Bit, 0 bytes)
View raw message