BookmarkSubscribeRSS Feed
srisai
Calcite | Level 5
Hi All,

Can we derive a date variable in information map studio?
Here is the problem description below,
I would like to derive a date variable from already existing 2 variables i.e i have a registered dataset in Information Map studio and i have corresponding map also.
I have 2 date variables like start date and drop date.........so here i would like to create a new variable which is going to have both start and drop dates together as data values.
So could you please help me how to derive teh new variable in information map studio in order to achieve this?

Please respond.

Thanks,
Sri
4 REPLIES 4
Cynthia_sas
SAS Super FREQ
Hi:
I don't understand what you mean when you say " i would like to create a new variable which is going to have both start and drop dates together as data values."

Usually date variables are numeric variables that hold 1 value -- the number of days since Jan 1, 1960 (the SAS "internal" value of 0). So if you have this data:
[pre]
Start Drop
-3334 0 (Internally Stored Values)
[/pre]
The start date would represent Nov 15, 1950 and the drop date would represent Jan 1, 1960 for those two separate internally stored date variables.

How would you envision creating 1 new variable from 2 variables??? What would the new variable look like? Would it represent the number of days between the start date and the drop date? Would it be a numeric variable or a character variable??? Can you use the two dates above and show what your new variable would look like?? Can you explain how you would use this new variable that somehow "had both dates together as data values"??

cynthia
srisai
Calcite | Level 5
Hi,

It looks like my explanation confusing you. I just gave that as a sample explanation.
Here is the brief description below,

I have two variables in the dataset
1 call date
2 login date

so here i need to derive a new variable based on these call date and login date coulumns.
My derivation is like this,

if call date ne . then newvariable = call date
if login date ne . then newvariable = login date

So i would like to derive the new variable in information map studio not in SAS/EG.
Hope it understand and if not let me know.

Thanks,
Sri
TSBruce
SAS Employee
You could create a new data item of type Date that is based on a case statement. For example, a case statement could looke like the following:

case when <<table.date1>> ne . then <<table.date1>> else <<table.date2>> end
srisai
Calcite | Level 5
Hey........

Thank you so much..........case statement working fine......

Thanks,
Sri

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

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
  • 1245 views
  • 0 likes
  • 3 in conversation