From: GuyA on
Simple question.

String:

14/9/2007 11:25:59

What's the correct informat for such a string? I just can't get it to
work right, and end up scanning off the date and time to do
separately. But I'm well aware that there is an informat for pretty
much everything...

Thanks.
From: Patrick on
I believe that there is actually no pre-defined informat for this
pattern of a datetime string. You'll have to continue doing what
you're already doing.
From: Arthur Tabachneck on
Guy,

Simple answer: (1) declare options datestyle=dmy (2) use anydtdtm18.
informat and (3) include an ampersand to read past the space. For
example:

options datestyle=dmy;
data have;
informat datetime anydtdtm18.;
format date date9.;
format time time8.;
input datetime &;
date=datepart(datetime);
time=timepart(datetime);
cards;
14/9/2007 11:25:59
12/7/2010 15:25:59
;

HTH,
Art
------------
On Aug 10, 6:13 am, GuyA <guya.carpen...(a)gmail.com> wrote:
> Simple question.
>
> String:
>
> 14/9/2007 11:25:59
>
> What's the correct informat for such a string? I just can't get it to
> work right, and end up scanning off the date and time to do
> separately. But I'm well aware that there is an informat for pretty
> much everything...
>
> Thanks.