|
|
| Author |
Message |
vasantha
New User
Joined: 05 Aug 2008 Posts: 16 Location: hyderabad
|
|
|
|
Hi,
I need to compare two dates. One is in MMDDYYYY format. But another date is in PD4 format. Can you please tell me, how can i convert a packed decimal date to MMDDYYYY format
Thank You, |
|
| Back to top |
|
 |
References
|
|
 |
dick scherrer
Global Moderator
Joined: 23 Nov 2006 Posts: 8729 Location: 221 B Baker St
|
|
|
|
Hello Vasantha and welcome to the forums,
In which environment are you working (COBOL, some other programming language, your sort product, some other utility, etc.)? |
|
| Back to top |
|
 |
vasantha
New User
Joined: 05 Aug 2008 Posts: 16 Location: hyderabad
|
|
|
|
hi,
The conversion should be in SAS,
Thank You |
|
| Back to top |
|
 |
vasantha
New User
Joined: 05 Aug 2008 Posts: 16 Location: hyderabad
|
|
|
|
| Can anyone help me on this........!!! i was trying from yesterday.... still iam not able to get the correct format............ |
|
| Back to top |
|
 |
Anuj D.
Global Moderator
Joined: 22 Apr 2006 Posts: 2222 Location: Phoenix, AZ
|
|
|
|
| vasantha wrote: |
| Can anyone help me on this........!!! |
I don't speak SAS but if you can use SORT, there can be some suggestions. |
|
| Back to top |
|
 |
vasantha
New User
Joined: 05 Aug 2008 Posts: 16 Location: hyderabad
|
|
|
|
The requirement is in SAS only not SORT.
Thank You, |
|
| Back to top |
|
 |
gcicchet
Senior Member
Joined: 28 Jul 2006 Posts: 663
|
|
|
|
Hi,
I'm no expert at this but how does an eight byte number fit in a PD4 format ?
Gerry |
|
| Back to top |
|
 |
Anuj D.
Global Moderator
Joined: 22 Apr 2006 Posts: 2222 Location: Phoenix, AZ
|
|
| Back to top |
|
 |
vasantha
New User
Joined: 05 Aug 2008 Posts: 16 Location: hyderabad
|
|
|
|
Thank you for providing the docs..these are helpful for me.........i will try with these formats....
Once again Thank You...... |
|
| Back to top |
|
 |
Anuj D.
Global Moderator
Joined: 22 Apr 2006 Posts: 2222 Location: Phoenix, AZ
|
|
|
|
Hi,
You are welcome...
They say, when you are in need it requires little efforts from your side, if you don't get succeed in some initials attempts try a littlie more..
PS.: above was just a philosophy..  |
|
| Back to top |
|
 |
Robert Sample
Senior Member
Joined: 06 Jun 2008 Posts: 941 Location: Atlanta, GA
|
|
|
|
What does some of the PD4 data look like? As a long-time SAS user, PD4 dates usually lack the century ... but no problem to process.
| Code: |
| X = INPUT(PUT(PD4VAR,Z8.),MMDDYY8.) ; |
or other appropriate data input ... the PUT as Z8. puts the PD4 variable out as 8 bytes, zero filled, then the INPUT function can read the date. |
|
| Back to top |
|
 |
|
|