BookmarkSubscribeRSS Feed
radha009
Quartz | Level 8

my date field displays as , in proc report i want to

 

define date / display format=DDMMYY10.;

 

expecting display in 05/16/2018 format

 

Date

16MAY18:16:00:00
16MAY18:20:00:00
17MAY18:10:00:00
17MAY18:10:00:00
17MAY18:10:00:00
2 REPLIES 2
PaigeMiller
Diamond | Level 26

Show us the entire PROC REPORT code. Show us the SASLOG. Show us the entire PROC REPORT output.

--
Paige Miller
Tom
Super User Tom
Super User

The FORMAT DDMMYY. works on DATE values.  But it looks like you want to display DATETIME values.

 

Dates are stored as number of days and datetime is stored as a number of seconds.

If you try to display a date using a datetime format it will look like your values are from early in 1960.

If you try to display a datetime value using a date format then you will probably get an error since the year value will be more than 4 digits ong!

 

What values are in your actual data?  If they are dates why would you want to add/display a time part? 

sas-innovate-2026-white.png



April 27 – 30 | Gaylord Texan | Grapevine, Texas

Registration is open

Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!

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
  • 2 replies
  • 1836 views
  • 0 likes
  • 3 in conversation