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 2024

Innovate_SAS_Blue.png

Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.

If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website. 

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.

Get the $99 certification deal.jpg

 

 

Back in the Classroom!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

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