Skip to Content
0
Nov 22, 2005 at 11:52 PM

How to convert a BigDecimal to Date?

2437 Views

Hi all,

I have a RFC provide me a time representation in BigDecimal format (yyyymmddhhmmss).

For example: '20051116082815' equals 16th Nov. 2005 8:28:15

What I have in mind is to bind the RFC time to a context node element of type "date" which I want to display in a textfield UI element.

So how can I convert the BigDecimal Format into the simpletype "date"?

I tried the following implementation. But it doesn`t seem to work.

IcaseResultElement caseResult.setCreateTime(
wdContext.nodeCaseOutput().currentCaseOutputElement()
.getEv_Create_Time().toString()
.substring(0,7));

"caseResult" is the node. "CreateTime" is the concerned node element of type "date". I used the substring method because I only need the date.

Thanks

Xiaopeng