BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
MijnSGS2
Calcite | Level 5

Hi all,

 

Is it possible in SAS to convert a Dutch datetime like this one:

09 oktober 2018 16:50:10 uur

 

To a SAS date like: 21466

or to SAS seconds like this: 1854723010?

 

I tried datepart(my_date_variable) but no luck..

Any help?

Thanks in advance.

 

1 ACCEPTED SOLUTION

Accepted Solutions
data_null__
Jade | Level 19

 
123  data _null_;
124     options locale=Dutch_Netherlands;
125     y=input('09 oktober 2018 16:50:10 uur', nldatm30.);
126     put y= y=datetime22.;
127     run;

y=1854723010 y=09OCT2018:16:50:10
@MijnSGS2 wrote:

Hi all,

 

Is it possible in SAS to convert a Dutch datetime like this one:

09 oktober 2018 16:50:10 uur

 

To a SAS date like: 21466

or to SAS seconds like this: 1854723010?

 

I tried datepart(my_date_variable) but no luck..

Any help?

Thanks in advance.

 


 

View solution in original post

5 REPLIES 5
data_null__
Jade | Level 19

 
123  data _null_;
124     options locale=Dutch_Netherlands;
125     y=input('09 oktober 2018 16:50:10 uur', nldatm30.);
126     put y= y=datetime22.;
127     run;

y=1854723010 y=09OCT2018:16:50:10
@MijnSGS2 wrote:

Hi all,

 

Is it possible in SAS to convert a Dutch datetime like this one:

09 oktober 2018 16:50:10 uur

 

To a SAS date like: 21466

or to SAS seconds like this: 1854723010?

 

I tried datepart(my_date_variable) but no luck..

Any help?

Thanks in advance.

 


 

novinosrin
Tourmaline | Level 20

My oh my @data_null__  Sir, is there anything that you do not know about. Jeez, can't believe that knowledge transcends geography info. Hats off!

data_null__
Jade | Level 19

@novinosrin wrote:

My oh my @data_null__  Sir, is there anything that you do not know about. Jeez, can't believe that knowledge transcends geography info. Hats off!


@novinosrin It is all about the documentation. Cat Happy  I know SAS has national language support and that I needed an in-format.  I copied the example and used @MijnSGS2 data. 

MijnSGS2
Calcite | Level 5
This is master code!
Thanks so much! 🙂

SAS Innovate 2025: Register Now

Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 5 replies
  • 1264 views
  • 9 likes
  • 4 in conversation