| Summary: | StringLib.format(myDate, "M/d/yy") returning null | ||||||
|---|---|---|---|---|---|---|---|
| Product: | z_Archived | Reporter: | broy2 | ||||
| Component: | EDT | Assignee: | Yun Feng Ma <mayunf> | ||||
| Status: | CLOSED FIXED | QA Contact: | |||||
| Severity: | normal | ||||||
| Priority: | P3 | CC: | mayunf | ||||
| Version: | unspecified | ||||||
| Target Milestone: | --- | ||||||
| Hardware: | PC | ||||||
| OS: | Windows XP | ||||||
| Whiteboard: | |||||||
| Attachments: |
|
||||||
Created attachment 206449 [details]
Patch
Here is a patch. Thanks.
Fixed, add logic to handle single "M" and "d" format. Thanks. Verified in 20111108 build. |
Use EUNIT to run: library dateFromGregorian myDate date; myString string; i int = 19990201; function dateFromGregorian(){@Test} myDate = dateTimeLib.dateFromGregorian(i); myString = StringLib.format(myDate, "M/d/yy"); LogResult.assertStringEqual("dateFromGregorian", "2/1/99", myString); end end dateFromGregorian - Failed: Expected value = '2/1/99' Actual value = 'null'