PDA

View Full Version : Convert Date Type L to numeric



jrhoads@cdsgroup.com
01-18-2002, 08:31 AM
Is the database field numeric? Couldn't you just Z-ADD the database field to the DS WKDATE and change the DS definition to this: D WKDATE 18 25D D WKYR 18 21 0 D WKMO 22 23 0 D WKDA 24 25 0 Does this solve your problem? Or am I missing something??????

Guest.Visitor
01-18-2002, 08:44 AM
If you're really dealing with a native date field, just do this: <pre>*ISO MOVE LDATE PACK80</pre> Chris

Guest.Visitor
01-18-2002, 08:51 AM
Steve - I tried but couldn't replicate the problem. What values are you starting with for the date and getting for the work fields? Bill

Guest.Visitor
01-22-2002, 06:48 AM
All - I've been asked to write a program which (among other things) will take an *ISO date from a type L, length 10, database field and shove it into an 8 byte packed field and it's proving to be quite a challenge. I have attempted to define a 10 byte data structure to hold the type L date and redefine it as below: D WKDATE 18 27D D WKYR 18 21 0 D WKMO 23 24 0 D WKDA 26 27 0 But when I reference WKYR, WRMO, or WKDA, it doesn't appear to be the expected value. What am I doing wrong? Thanks, Steve

Guest.Visitor
01-22-2002, 06:48 AM
Gee guys - Thanks for the responses! Since I posted this 3 months ago and don't remember the reason that I posted it or the program that caused me to post it, I can't answer any of your questions without causing a major brain cramp. Thanks, Steve