SAS Data Integration Studio, DataFlux Data Management Studio, SAS/ACCESS, SAS Data Loader for Hadoop and others

Setting a specific NLDATM21. date value?

Accepted Solution Solved
Reply
Frequent Contributor
Posts: 89
Accepted Solution

Setting a specific NLDATM21. date value?

I need to insert a specific value into a date variable, but am having a hard time figuring out how to handle it.

The VALID_TO date needs to be set to "06.mar.12 03:33:38", which uses the format NLDATM21.

proc sql;

  update testdata

       set VALID_TO = XXXXXXX

       where insured_id = 123456;

quit;

Please advise me on this. Thanks for your time . Smiley Happy


Accepted Solutions
Solution
‎10-04-2012 04:57 AM
Super User
Posts: 5,256

Re: Setting a specific NLDATM21. date value?

Is the format important?

The easiest way to insert datetime values is to use the dt literal, which has the argument formatted as DATETIME

valid_to = '06Mar2012:03:33:38'dt

You can convert your datetime constant using the input function:

valid_to = input('06mar.12 03:33:38',nldatm.)


Data never sleeps

View solution in original post


All Replies
Solution
‎10-04-2012 04:57 AM
Super User
Posts: 5,256

Re: Setting a specific NLDATM21. date value?

Is the format important?

The easiest way to insert datetime values is to use the dt literal, which has the argument formatted as DATETIME

valid_to = '06Mar2012:03:33:38'dt

You can convert your datetime constant using the input function:

valid_to = input('06mar.12 03:33:38',nldatm.)


Data never sleeps
Frequent Contributor
Posts: 89

Re: Setting a specific NLDATM21. date value?

Perfect, thank you. For this, and for your countless other good advice. Smiley Happy

☑ This topic is SOLVED.

Need further help from the community? Please ask a new question.

Discussion stats
  • 2 replies
  • 464 views
  • 0 likes
  • 2 in conversation