BookmarkSubscribeRSS Feed
Lani
Calcite | Level 5
I have a column named "EffectiveDate". I want to check for a record that has an EffectiveDate of "01-01-2010", then this record need to be removed. I don't know how to compare since the EffectiveDate is formated in Date type and the values look numerics. Can I use put function to convert the EffectiveDate to string? then I compare it with "01-01-2010". Your inputs are much appreciated.
2 REPLIES 2
sbb
Lapis Lazuli | Level 10 sbb
Lapis Lazuli | Level 10
You will need to determine the format (CHARACTER OR SAS/NUMERIC) of the date variables involved -- best to work with SAS NUMERIC variables and make comparisons. Suggest some basic SAS DATE variable review and reading from the SAS support http://support.sas.com/ website.

Scott Barry
SBBWorks, Inc.

SAS Language Reference: Concepts - Dates, Times, and Intervals
http://support.sas.com/documentation/cdl/en/lrcon/61722/HTML/default/a001112342.htm
GertNissen
Barite | Level 11
if EffectiveDate = '01jan2010'd then delete;

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 2 replies
  • 2940 views
  • 0 likes
  • 3 in conversation