Warning: Undefined array key "birthday_search" in phar:///home/duptmor/public_html/prod.mcpressonline.com/forum/core/vb/vb.phar/api/user.php on line 173
Warning: Undefined array key "joindate" in phar:///home/duptmor/public_html/prod.mcpressonline.com/forum/core/vb/vb.phar/api/user.php on line 190
Warning: Undefined array key "posts" in phar:///home/duptmor/public_html/prod.mcpressonline.com/forum/core/vb/vb.phar/api/user.php on line 191
Warning: Undefined array key "posts" in phar:///home/duptmor/public_html/prod.mcpressonline.com/forum/core/vb/vb.phar/api/user.php on line 197
Warning: Undefined array key "userid" in phar:///home/duptmor/public_html/prod.mcpressonline.com/forum/core/vb/vb.phar/api/user.php on line 6509
Warning: Undefined array key "userid" in phar:///home/duptmor/public_html/prod.mcpressonline.com/forum/core/vb/vb.phar/api/user.php on line 212
Warning: Undefined array key "privacy_options" in phar:///home/duptmor/public_html/prod.mcpressonline.com/forum/core/vb/vb.phar/api/user.php on line 251
Warning: Undefined array key "userid" in phar:///home/duptmor/public_html/prod.mcpressonline.com/forum/core/vb/vb.phar/library/user.php on line 4998
Warning: Undefined array key "userid" in phar:///home/duptmor/public_html/prod.mcpressonline.com/forum/core/vb/vb.phar/library/user.php on line 1585
Warning: Undefined array key "lastactivity" in phar:///home/duptmor/public_html/prod.mcpressonline.com/forum/core/vb/vb.phar/library/user.php on line 1601
Warning: Trying to access array offset on value of type bool in /home/duptmor/public_html/prod.mcpressonline.com/forum/core/vb5/route/profile.php on line 74
Retrieving formatted value instead of numeric value -
MC Press Online Forums
Unconfigured Ad Widget
Collapse
Announcement
Collapse
No announcement yet.
Retrieving formatted value instead of numeric value
Retrieving formatted value instead of numeric value
I need to retrieve a date field from a cell. If I view the cell in Excel it's displayed as '05/03/2010
'. If I use HSSFCell_getStringCellValue it fails because the date is stored as a numeric value. If I use HSSFCell_getNumericCellValue it retrieves the numeric value that Excel stores it in (which is 40301). Is there any way to retrieve the edited value so reformatting/converting doesn't have to occur in the RPG program?
Unless I'm misreading your post, the date within Excel should convert easily to a date data type on the AS400. At this point the date can be read by an RPG(LE) program.
It returns a Date object, so you could retrieve what you're looking for from there, or use the toString method on the Date. This makes a perfect candidate for a custom procedure
Note: I do not have that version of POI currently installed, so I am not sure if it is available for the version you are using, but you could try it out.
Have Fun,
Tom
Last edited by Guest; 10-11-2010, 08:28 PM.
Reason: Added Note
Comment