BookmarkSubscribeRSS Feed
Sathya3
Obsidian | Level 7

I am using below code .one and two has a column called reporting_date.In one and two , reporting_date is defined with format yymmdd10.I could check that using describe table command.
But, when I try to do append , it is giving warning that format of reporting_date in one is date9
and format of reporting_date in two is yymmdd10.
Why is this happening?

data results;
set one;
run;
proc append base=one data=two;
run;

4 REPLIES 4
PaigeMiller
Diamond | Level 26

But, when I try to do append , it is giving warning that format of reporting_date in one is date9
and format of reporting_date in two is yymmdd10.
Why is this happening?

 

It happens because the formats are different in the two tables.

--
Paige Miller
Sathya3
Obsidian | Level 7

when I give describe table , I could see format is same (yymmdd10.) in both the tables..I do not understand how this date9.  came into picture

PaigeMiller
Diamond | Level 26

I have a rule. When SAS says something is true, and the user says it is not true, my rule is that I believe SAS. I have never seen a case where the user is right and SAS is wrong.

 

But, feel free to convince me you are right.

 

Show us PROC CONTENTS output (screen capture is fine, use the "Insert Photos" icon to include your screen captures in your reply; do NOT attach files) from both data sets, which you have named ONE and TWO. Or, if you are working on real data sets that have real names, show us the LOG of the code for PROC APPEND and the PROC CONTENTS on the two real data sets.

--
Paige Miller
ballardw
Super User

Run Proc Contents on both data sets used in proc append. Show us the result.

 

I strongly suspect that you Proc Append code is using a different data set then you are looking at somewhere.

And are you looking at the SAS data set or something else that SAS may have read to create the data set? The format might have been changed on reading.

 

hackathon24-white-horiz.png

The 2025 SAS Hackathon Kicks Off on June 11!

Watch the live Hackathon Kickoff to get all the essential information about the SAS Hackathon—including how to join, how to participate, and expert tips for success.

YouTube LinkedIn

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 4 replies
  • 1340 views
  • 1 like
  • 3 in conversation