Quantcast
Channel: SmartClient Forums
Viewing all articles
Browse latest Browse all 4756

Formatting a Date and parsing it back to Date issue

$
0
0
I have the following code:

Code:

Date date = new Date();
String formattedDate = DateUtil.format(date, "yyyyMMddHHmm");
SC.logWarn("formattedDate == " + formattedDate);
Date parsedDate = DateUtil.parseInput(formattedDate, "yyyyMMddHHmm");
SC.logWarn("parsedDate == " + parsedDate);

This produces the following output:
Code:

17:09:03.322:MUP9:WARN:Log:formattedDate == 201409011709
17:09:03.323:MUP9:WARN:Log:parsedDate == null

How come parseInput() returns null, and not a Date object? Am I missing something obvious?

SmartClient Version: v10.0d_2014-08-20/Pro Deployment (built 2014-08-21)

Viewing all articles
Browse latest Browse all 4756

Trending Articles