ODS and Base Reporting

Build reports by using ODS to create HTML, PDF, RTF, Excel, text reports and more!
BookmarkSubscribeRSS Feed
rkumar23
Calcite | Level 5

I may have lost my mind at the moment so any quick idea would help certainly....

So I have variable which is in the TIME13.3 format whereas  I have another variable which is in numeric format ....Now I need to put a WHERE clause however before that need to convert TIME13.3 format variable to the numeric format I tried PUT function however that doesn't seems to work...quick thought please?

3 REPLIES 3
RaviKommuri
Fluorite | Level 6

May be you can use a similar code like the code I have given below.

MYTIME = INPUT(PUT(TIME1,BEST12.),$40.);

Kurt_Bremser
Super User

TIME13.3 is a numeric format, so your variable is already numeric (seconds of the day) and can be "converted" by simply changing its format.

I suspect that yoout other variable has a specific sequence of digits; could you give an example?

rkumar23
Calcite | Level 5

Thanks Kurt you was correct i put the TIMEPART(VAR2) and it resolved the problem...thanks for pointing in right direction..

sas-innovate-white.png

Our biggest data and AI event of the year.

Don’t miss the livestream kicking off May 7. It’s free. It’s easy. And it’s the best seat in the house.

Join us virtually with our complimentary SAS Innovate Digital Pass. Watch live or on-demand in multiple languages, with translations available to help you get the most out of every session.

 

Register now!

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
  • 3 replies
  • 2166 views
  • 1 like
  • 3 in conversation