| Author |
BigDecimal to Date
|
Tanu Gulati
Ranch Hand
Joined: Oct 06, 2008
Posts: 113
|
|
|
Can any body tell me how to convert BigDecimal to Date?
|
thanks
Tanu Gulati
|
 |
Jesper de Jong
Java Cowboy
Bartender
Joined: Aug 16, 2005
Posts: 12928
|
|
A BigDecimal holds a number. A Date is something completely different. Does your BigDecimal hold a number that somehow encodes a date? You need to know what the number in the BigDecimal means exactly to be able to convert it. Assuming that your BigDecimal holds the number of milliseconds since 1 January 1970, 12:00 AM UTC (which is a common way to encode dates), you could do it like this:
|
Java Beginners FAQ - JavaRanch SCJP FAQ - The Java Tutorial - Java SE 7 API documentation
Scala Notes - My blog about Scala
|
 |
 |
|
|
subject: BigDecimal to Date
|
|
|