A convenient collection of formats provided by SAS are
These correspond to formats Date, MonYY, YYqC and WeekDatX, but work on DateTime values rather than Date values.
These formats are very convenient for displaying dates provided through SAS/Access routines ~ because typically these data access modules create dateTime values ~ and these formatsneed no datepart() conversion.
Here in UK, date layout standards would like a format DTDDMMYY for dates loaded through SAS/Access, but the format does not exist..... until I create it with [pre]proc format ;
'1jan1582:0:0'dt - '31DEC9999:23:59:59.99'dt
run ;[/pre]Of course, this format must be able to be found through the FMTSEARCH paths.
Before I start building user infrastructure to standardise support for this simple National Language standard, is there any prospect of the list of DT-formats being expanded to support the wider range of date display styles expected of, and built-in to SAS?
as declared in the alphabetical list of formats [pre]EURDFDTw.d Format EURDFDT w.d
Writes international datetime values in the form ddmmmyy:hh:mm:ss.ss or ddmmmyyyy hh:mm:ss.ss. [/pre] subject to the LOCALE= value (and probably not just european)
I was seeking a format that took a datetime value and returned the datepart in more formats than the limited set offered by the DT-formats group. That group are helpful as all databases, that I have come across, return dates to SAS as datetime values and I don't need to provide screen space for a timepart full of zeroes.
In particular I like the ddmmyy format, so wanted a DTddmmyy. It is easy to create but pointless to build the administrative support required among a group of users sharing the data on which they work. So I was asking if SAS might be planning a hotfix providing more dt-type date formats. Recent expansion of formats does seem to be heading in different directions.
My apology for overlooking this particular detail. You will want to contact SAS tech support directly with your inquiry request for a new "datetime" format, however in the meantime you will likely need to move forward to create your own permanent SAS format for this purpose (make it fairly unique named for easy identification).
Definitely not unreasonable - I have supported UK-based companies who use SAS and they typically display/print only date and sometimes the time-portion but as separate columns, rather than combined.
Of course your other choice is to concatenate the two components at display time, creating a character-type variable in the desired format.
Concerning your site's SAS shared foundation - I take that to mean a SAS enterprise environment master CATALOG OBJECT library,where you store various site-unique SAS-related items, such as FORMATs (either display or look-up), possibly INFORMATs, ODS templates, and other tables. Suggest you set this up centrally and provide either a user-invoked macro to concatenate your local OBJECT using a LIBNAME . Look at using the GETOPTION function to retrieve the current FMTSEARCH and conditionally replace it, if necessary.