<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: what time format should I use for values like this: 2014-01-01-10.11.47.518000 in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/what-time-format-should-I-use-for-values-like-this-2014-01-01-10/m-p/250947#M47343</link>
    <description>&lt;P&gt;is it to read or write in that format ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;to read u can use&amp;nbsp;anydtdte. informat&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;to write in that format you will need to use picture in proc format .&lt;/P&gt;</description>
    <pubDate>Thu, 18 Feb 2016 20:31:55 GMT</pubDate>
    <dc:creator>smijosimon</dc:creator>
    <dc:date>2016-02-18T20:31:55Z</dc:date>
    <item>
      <title>what time format should I use for values like this: 2014-01-01-10.11.47.518000</title>
      <link>https://communities.sas.com/t5/SAS-Programming/what-time-format-should-I-use-for-values-like-this-2014-01-01-10/m-p/250936#M47340</link>
      <description>&lt;P&gt;I used informat anydtdt40. and format datetime. to read them in, but they are not read in at all. all blank.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 18 Feb 2016 20:10:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/what-time-format-should-I-use-for-values-like-this-2014-01-01-10/m-p/250936#M47340</guid>
      <dc:creator>fengyuwuzu</dc:creator>
      <dc:date>2016-02-18T20:10:47Z</dc:date>
    </item>
    <item>
      <title>Re: what time format should I use for values like this: 2014-01-01-10.11.47.518000</title>
      <link>https://communities.sas.com/t5/SAS-Programming/what-time-format-should-I-use-for-values-like-this-2014-01-01-10/m-p/250947#M47343</link>
      <description>&lt;P&gt;is it to read or write in that format ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;to read u can use&amp;nbsp;anydtdte. informat&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;to write in that format you will need to use picture in proc format .&lt;/P&gt;</description>
      <pubDate>Thu, 18 Feb 2016 20:31:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/what-time-format-should-I-use-for-values-like-this-2014-01-01-10/m-p/250947#M47343</guid>
      <dc:creator>smijosimon</dc:creator>
      <dc:date>2016-02-18T20:31:55Z</dc:date>
    </item>
    <item>
      <title>Re: what time format should I use for values like this: 2014-01-01-10.11.47.518000</title>
      <link>https://communities.sas.com/t5/SAS-Programming/what-time-format-should-I-use-for-values-like-this-2014-01-01-10/m-p/250949#M47344</link>
      <description>&lt;P&gt;to read&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;anydtdte. does not work either. all values are blank after importing&lt;/P&gt;</description>
      <pubDate>Thu, 18 Feb 2016 20:35:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/what-time-format-should-I-use-for-values-like-this-2014-01-01-10/m-p/250949#M47344</guid>
      <dc:creator>fengyuwuzu</dc:creator>
      <dc:date>2016-02-18T20:35:58Z</dc:date>
    </item>
    <item>
      <title>Re: what time format should I use for values like this: 2014-01-01-10.11.47.518000</title>
      <link>https://communities.sas.com/t5/SAS-Programming/what-time-format-should-I-use-for-values-like-this-2014-01-01-10/m-p/250958#M47348</link>
      <description>&lt;PRE&gt;data test;

	date1 = '2014-01-01-10.11.47.518000';

	smj = input(date1 ,ANYDTDTM.);

run;&lt;/PRE&gt;&lt;P&gt;This worked for me !&lt;/P&gt;</description>
      <pubDate>Thu, 18 Feb 2016 20:54:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/what-time-format-should-I-use-for-values-like-this-2014-01-01-10/m-p/250958#M47348</guid>
      <dc:creator>smijosimon</dc:creator>
      <dc:date>2016-02-18T20:54:57Z</dc:date>
    </item>
    <item>
      <title>Re: what time format should I use for values like this: 2014-01-01-10.11.47.518000</title>
      <link>https://communities.sas.com/t5/SAS-Programming/what-time-format-should-I-use-for-values-like-this-2014-01-01-10/m-p/250964#M47349</link>
      <description>&lt;P&gt;Thanks. Right, your code works.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I use the following infile code, which does not work. Not sure where the problem is.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;   data WORK.LOGIN ;
    infile 'D:\data\LOGIN.csv' delimiter = ',' MISSOVER DSD lrecl=32767 firstobs=2 ;
       informat MEMBER_ID $34. ;
       informat LOGIN_TIMESTAMP ANYDTDTM. ;
       informat LOGOUT_TIMESTAMP ANYDTDTM. ;
       format MEMBER_ID $34. ;
       format LOGIN_TIMESTAMP datetime. ;
       format LOGOUT_TIMESTAMP datetime. ;
    input
                MEMBER_ID $
                LOGIN_TIMESTAMP 
                LOGOUT_TIMESTAMP;
    run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 18 Feb 2016 21:08:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/what-time-format-should-I-use-for-values-like-this-2014-01-01-10/m-p/250964#M47349</guid>
      <dc:creator>fengyuwuzu</dc:creator>
      <dc:date>2016-02-18T21:08:04Z</dc:date>
    </item>
    <item>
      <title>Re: what time format should I use for values like this: 2014-01-01-10.11.47.518000</title>
      <link>https://communities.sas.com/t5/SAS-Programming/what-time-format-should-I-use-for-values-like-this-2014-01-01-10/m-p/251019#M47369</link>
      <description>&lt;P&gt;Were there any messages in the log?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also did you try explicitly setting a width for reading such as:&lt;/P&gt;
&lt;PRE class=" language-sas"&gt;&lt;CODE class="  language-sas"&gt;&lt;SPAN class="token statement"&gt;informat&lt;/SPAN&gt; LOGIN_TIMESTAMP ANYDTDTM26&lt;SPAN class="token punctuation"&gt;.&lt;/SPAN&gt; &lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If that doesn't help you should post any messages from the log and a few lines of example data that shows the behavior.&lt;/P&gt;</description>
      <pubDate>Fri, 19 Feb 2016 04:36:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/what-time-format-should-I-use-for-values-like-this-2014-01-01-10/m-p/251019#M47369</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2016-02-19T04:36:47Z</dc:date>
    </item>
    <item>
      <title>Re: what time format should I use for values like this: 2014-01-01-10.11.47.518000</title>
      <link>https://communities.sas.com/t5/SAS-Programming/what-time-format-should-I-use-for-values-like-this-2014-01-01-10/m-p/251133#M47384</link>
      <description>&lt;P&gt;show us a sample of ur data&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;additionally if u &amp;nbsp;can try using all 3 vars as character nad then do a proc print &amp;nbsp;to see what is the data being passed on the variables to ensure data is not truncated&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 19 Feb 2016 14:26:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/what-time-format-should-I-use-for-values-like-this-2014-01-01-10/m-p/251133#M47384</guid>
      <dc:creator>smijosimon</dc:creator>
      <dc:date>2016-02-19T14:26:47Z</dc:date>
    </item>
    <item>
      <title>Re: what time format should I use for values like this: 2014-01-01-10.11.47.518000</title>
      <link>https://communities.sas.com/t5/SAS-Programming/what-time-format-should-I-use-for-values-like-this-2014-01-01-10/m-p/251138#M47386</link>
      <description>&lt;P&gt;I tried anydtdtm40. and anydtdtm26, did not work.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;TABLE width="540"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD width="305"&gt;LOGIN_TIMESTAMP&lt;/TD&gt;
&lt;TD width="235"&gt;LOGOUT_TIMESTAMP&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;2014-01-01-10.11.47.518000&lt;/TD&gt;
&lt;TD&gt;2014-01-01-11.12.11.594000&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;2014-01-01-10.46.56.362000&lt;/TD&gt;
&lt;TD&gt;2014-01-01-10.50.33.830000&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;2014-01-01-13.00.56.340000&lt;/TD&gt;
&lt;TD&gt;2014-01-01-13.19.28.438000&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;2014-01-01-13.04.51.569000&lt;/TD&gt;
&lt;TD&gt;2014-01-01-13.24.16.206000&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;2014-01-01-13.10.43.651000&lt;/TD&gt;
&lt;TD&gt;2014-01-01-13.29.27.735000&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;2014-01-01-20.36.43.038000&lt;/TD&gt;
&lt;TD&gt;2014-01-01-21.23.46.843000&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;2014-01-01-19.31.08.188000&lt;/TD&gt;
&lt;TD&gt;2014-01-01-20.06.23.152000&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;2014-01-01-20.41.12.057000&lt;/TD&gt;
&lt;TD&gt;2014-01-01-21.36.21.783000&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;2014-01-01-10.13.22.648000&lt;/TD&gt;
&lt;TD&gt;2014-01-01-10.55.23.402000&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;2014-01-01-12.07.37.904000&lt;/TD&gt;
&lt;TD&gt;2014-01-01-12.33.14.021000&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;2014-01-01-15.08.29.764000&lt;/TD&gt;
&lt;TD&gt;2014-01-01-15.47.05.939000&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;2014-01-01-20.59.14.579000&lt;/TD&gt;
&lt;TD&gt;2014-01-01-21.01.09.404000&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;2014-01-01-19.22.55.049000&lt;/TD&gt;
&lt;TD&gt;2014-01-01-19.48.15.591000&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;above is the part of the data, the two columns I have problem.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Below is from the log file:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;NOTE: The infile 'D:\data\LOGIN.csv&lt;CODE class="  language-sas"&gt;&lt;/CODE&gt;' is:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Filename=D:\data\LOGIN.csv,&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; RECFM=V,LRECL=32767,&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; File Size (bytes)=129790621,&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Last Modified=20Nov2034:08:54:54,&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Create Time=09Dec2015:12:16:28&lt;BR /&gt;&lt;BR /&gt;NOTE: 1410427 records were read from the infile 'D:\data\LOGIN.csv'.&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; The minimum record length was 64.&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; The maximum record length was 92.&lt;BR /&gt;NOTE: The data set WORK.LOGIN has 1410427 observations and 3 variables.&lt;BR /&gt;NOTE: DATA statement used (Total process time):&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; real time&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1.37 seconds&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; cpu time&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0.99 seconds&lt;/P&gt;</description>
      <pubDate>Fri, 19 Feb 2016 14:33:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/what-time-format-should-I-use-for-values-like-this-2014-01-01-10/m-p/251138#M47386</guid>
      <dc:creator>fengyuwuzu</dc:creator>
      <dc:date>2016-02-19T14:33:57Z</dc:date>
    </item>
    <item>
      <title>Re: what time format should I use for values like this: 2014-01-01-10.11.47.518000</title>
      <link>https://communities.sas.com/t5/SAS-Programming/what-time-format-should-I-use-for-values-like-this-2014-01-01-10/m-p/251150#M47393</link>
      <description>&lt;P&gt;I printed out the first 10 rows of the data&amp;amp;colon;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;54&amp;nbsp;&amp;nbsp; data _NULL_;&lt;BR /&gt;55&amp;nbsp;&amp;nbsp; infile "D:\data\LOGIN.csv" obs=10;&lt;BR /&gt;56&amp;nbsp;&amp;nbsp; input;&lt;BR /&gt;57&amp;nbsp;&amp;nbsp; put _infile_;&lt;BR /&gt;58&amp;nbsp;&amp;nbsp; run;&lt;BR /&gt;&lt;BR /&gt;NOTE: The infile "D:\data\LOGIN.csv" is:&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Filename=D:\data\LOGIN.csv,&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; RECFM=V,LRECL=32767,&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; File Size (bytes)=129790621,&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Last Modified=20Nov2034:08:54:54,&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Create Time=09Dec2015:12:16:28&lt;BR /&gt;&lt;BR /&gt;MEMBER_ID,LOGIN_TIMESTAMP,LOGOUT_TIMESTAMP&lt;BR /&gt;"101819860625","2014-01-01-10.11.47.518000","2014-01-01-11.12.11.594000"&lt;BR /&gt;"111619621641","2014-01-01-10.46.56.362000","2014-01-01-10.50.33.830000"&lt;BR /&gt;"100319558420","2014-01-01-13.00.56.340000","2014-01-01-13.19.28.438000"&lt;BR /&gt;"100319558420","2014-01-01-13.04.51.569000","2014-01-01-13.24.16.206000"&lt;BR /&gt;"100319558420","2014-01-01-13.10.43.651000","2014-01-01-13.29.27.735000"&lt;BR /&gt;"012719344260","2014-01-01-20.36.43.038000","2014-01-01-21.23.46.843000"&lt;BR /&gt;"110119839130","2014-01-01-19.31.08.188000","2014-01-01-20.06.23.152000"&lt;BR /&gt;"110119839130","2014-01-01-20.41.12.057000","2014-01-01-21.36.21.783000"&lt;BR /&gt;"062119809305","2014-01-01-10.13.22.648000","2014-01-01-10.55.23.402000"&lt;BR /&gt;NOTE: 10 records were read from the infile "D:\data\LOGIN.csv".&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; The minimum record length was 49.&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; The maximum record length was 92.&lt;BR /&gt;NOTE: DATA statement used (Total process time):&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; real time&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0.00 seconds&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; cpu time&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0.00 seconds&lt;/P&gt;</description>
      <pubDate>Fri, 19 Feb 2016 14:52:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/what-time-format-should-I-use-for-values-like-this-2014-01-01-10/m-p/251150#M47393</guid>
      <dc:creator>fengyuwuzu</dc:creator>
      <dc:date>2016-02-19T14:52:12Z</dc:date>
    </item>
    <item>
      <title>Re: what time format should I use for values like this: 2014-01-01-10.11.47.518000</title>
      <link>https://communities.sas.com/t5/SAS-Programming/what-time-format-should-I-use-for-values-like-this-2014-01-01-10/m-p/251155#M47395</link>
      <description>&lt;P&gt;if I read them as characters, I got this (a screen cut of first 5 lines):&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/1958i9F322310BE33058D/image-size/original?v=mpbl-1&amp;amp;px=-1" alt="Capture.PNG" title="Capture.PNG" border="0" /&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 19 Feb 2016 14:58:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/what-time-format-should-I-use-for-values-like-this-2014-01-01-10/m-p/251155#M47395</guid>
      <dc:creator>fengyuwuzu</dc:creator>
      <dc:date>2016-02-19T14:58:33Z</dc:date>
    </item>
    <item>
      <title>Re: what time format should I use for values like this: 2014-01-01-10.11.47.518000</title>
      <link>https://communities.sas.com/t5/SAS-Programming/what-time-format-should-I-use-for-values-like-this-2014-01-01-10/m-p/251157#M47396</link>
      <description>&lt;P&gt;right now, the solution I can find is, first read the time in as characters, and then use the following&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data new;
set LOGIN;
new_login = input(LOGIN_TIMESTAMP, anydtdtm.);
format new_login datetime.;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;to convert to datetime format. It works. Not sure the reason why I cannot import as datetime format directly.&lt;/P&gt;</description>
      <pubDate>Fri, 19 Feb 2016 15:07:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/what-time-format-should-I-use-for-values-like-this-2014-01-01-10/m-p/251157#M47396</guid>
      <dc:creator>fengyuwuzu</dc:creator>
      <dc:date>2016-02-19T15:07:01Z</dc:date>
    </item>
    <item>
      <title>Re: what time format should I use for values like this: 2014-01-01-10.11.47.518000</title>
      <link>https://communities.sas.com/t5/SAS-Programming/what-time-format-should-I-use-for-values-like-this-2014-01-01-10/m-p/251164#M47398</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;fengyuwuzu schrieb:&lt;BR /&gt;[...]&lt;BR /&gt;
&lt;P&gt;to convert to datetime format. It works. Not sure the reason why I cannot import as datetime format directly.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Imho the quotes prevent importing the dates directly.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Seems to work:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc fcmp outlib=work.functions.date;
   function transform(s $);
      return (input(dequote(s), anydtdtm.));
   endsub;
run;

options cmplib=(work.functions);

proc format;
   invalue importDatetime 
      other=[transform()]
   ;
run;


data work.have;
   length MEMBER_ID $ 30 LOGIN_TIMESTAMP LOGOUT_TIMESTAMP 8;

   informat LOGIN_TIMESTAMP LOGOUT_TIMESTAMP importDatetime.;

   infile datalines4 delimiter="," dsd;
   input MEMBER_ID LOGIN_TIMESTAMP LOGOUT_TIMESTAMP;   

   datalines4;
"101819860625","2014-01-01-10.11.47.518000","2014-01-01-11.12.11.594000"
"111619621641","2014-01-01-10.46.56.362000","2014-01-01-10.50.33.830000"
"100319558420","2014-01-01-13.00.56.340000","2014-01-01-13.19.28.438000"
"100319558420","2014-01-01-13.04.51.569000","2014-01-01-13.24.16.206000"
"100319558420","2014-01-01-13.10.43.651000","2014-01-01-13.29.27.735000"
"012719344260","2014-01-01-20.36.43.038000","2014-01-01-21.23.46.843000"
"110119839130","2014-01-01-19.31.08.188000","2014-01-01-20.06.23.152000"
"110119839130","2014-01-01-20.41.12.057000","2014-01-01-21.36.21.783000"
"062119809305","2014-01-01-10.13.22.648000","2014-01-01-10.55.23.402000"
;;;;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 19 Feb 2016 15:47:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/what-time-format-should-I-use-for-values-like-this-2014-01-01-10/m-p/251164#M47398</guid>
      <dc:creator>andreas_lds</dc:creator>
      <dc:date>2016-02-19T15:47:50Z</dc:date>
    </item>
    <item>
      <title>Re: what time format should I use for values like this: 2014-01-01-10.11.47.518000</title>
      <link>https://communities.sas.com/t5/SAS-Programming/what-time-format-should-I-use-for-values-like-this-2014-01-01-10/m-p/251166#M47400</link>
      <description>&lt;P&gt;Can you try this code -&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;PRE&gt;data WORK.LOGIN ;
        infile 'D:\data\LOGIN.csv' delimiter = ',' MISSOVER DSD lrecl=32767 firstobs=2 ;

       format MEMBER_ID $34. ;
       format LOGIN_TIMESTAMP datetime. ;
       format LOGOUT_TIMESTAMP datetime. ;

    input
                MEMBER_ID          $CHAR12.
                LOGIN_TIMESTAMP    ANYDTDTM.
                LOGOUT_TIMESTAMP   ANYDTDTM.  ;
run;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 19 Feb 2016 15:42:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/what-time-format-should-I-use-for-values-like-this-2014-01-01-10/m-p/251166#M47400</guid>
      <dc:creator>smijosimon</dc:creator>
      <dc:date>2016-02-19T15:42:49Z</dc:date>
    </item>
    <item>
      <title>Re: what time format should I use for values like this: 2014-01-01-10.11.47.518000</title>
      <link>https://communities.sas.com/t5/SAS-Programming/what-time-format-should-I-use-for-values-like-this-2014-01-01-10/m-p/251175#M47403</link>
      <description>Thank you, smijosimon. The same thing, still blank.</description>
      <pubDate>Fri, 19 Feb 2016 16:02:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/what-time-format-should-I-use-for-values-like-this-2014-01-01-10/m-p/251175#M47403</guid>
      <dc:creator>fengyuwuzu</dc:creator>
      <dc:date>2016-02-19T16:02:45Z</dc:date>
    </item>
    <item>
      <title>Re: what time format should I use for values like this: 2014-01-01-10.11.47.518000</title>
      <link>https://communities.sas.com/t5/SAS-Programming/what-time-format-should-I-use-for-values-like-this-2014-01-01-10/m-p/251177#M47405</link>
      <description>Yes, andreas_lds! This solved the problem. Now I have learned this which will be helpful in future.</description>
      <pubDate>Fri, 19 Feb 2016 16:03:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/what-time-format-should-I-use-for-values-like-this-2014-01-01-10/m-p/251177#M47405</guid>
      <dc:creator>fengyuwuzu</dc:creator>
      <dc:date>2016-02-19T16:03:51Z</dc:date>
    </item>
    <item>
      <title>Re: what time format should I use for values like this: 2014-01-01-10.11.47.518000</title>
      <link>https://communities.sas.com/t5/SAS-Programming/what-time-format-should-I-use-for-values-like-this-2014-01-01-10/m-p/251311#M47461</link>
      <description>&lt;P&gt;OP may not read this but there actually is a data character issue.&lt;/P&gt;
&lt;P&gt;The MONTH valueof the Logout timestamp is not a simple value. When I paste this&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#008080" face="SAS Monospace" size="2"&gt;2014&lt;/FONT&gt;&lt;FONT face="SAS Monospace" size="2"&gt;-​01-&lt;/FONT&gt;&lt;FONT color="#008080" face="SAS Monospace" size="2"&gt;01&lt;/FONT&gt;&lt;FONT face="SAS Monospace" size="2"&gt;-&lt;/FONT&gt;&lt;FONT color="#008080" face="SAS Monospace" size="2"&gt;11.12.11.594000&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#008080" face="SAS Monospace" size="2"&gt;Into my SAS editor the fir 01, appearing in black above was hightlighted by the editor settings as non-numeric. And when I was using the cursor keys to count columns I had to press a key TWICE to go from the - to the 0 at that location.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#008080" face="SAS Monospace" size="2"&gt;This makes suspect a partial problem with the encodeing.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#008080" face="SAS Monospace" size="2"&gt;And when I changed the LOGIN_Timestamp to look like &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;2014-01-01-10:11:47.518000&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#008080" face="SAS Monospace" size="2"&gt;then that reads fine. Which concurs with my 9.2 documentation that says : are time delimiters for hours and minutes and . are date delimiters. Since you had, in effect, a date value (2014-01-01)&amp;nbsp;followed by a date value (10.11.47 which would be 17 Oct 1947) you get something the informat isn't instructed to handle and results in missing&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 19 Feb 2016 23:23:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/what-time-format-should-I-use-for-values-like-this-2014-01-01-10/m-p/251311#M47461</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2016-02-19T23:23:13Z</dc:date>
    </item>
    <item>
      <title>Re: what time format should I use for values like this: 2014-01-01-10.11.47.518000</title>
      <link>https://communities.sas.com/t5/SAS-Programming/what-time-format-should-I-use-for-values-like-this-2014-01-01-10/m-p/251314#M47463</link>
      <description>&lt;P&gt;Since you are using periods instead of colons before the hours, minutes and seconrd the extra period before the fractional seconds is confusing it. &amp;nbsp;You can get the INPUT() or INPUTN() function to convert the string if you ignore the fractional seconds. &amp;nbsp;So if you use ANYDTDTM19. informat then it works, but it does not read the '.51800' part. &amp;nbsp;Also note that when you use DSD option on the INFILE statement the length specified in the INFORMAT is ignored.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 19 Feb 2016 23:46:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/what-time-format-should-I-use-for-values-like-this-2014-01-01-10/m-p/251314#M47463</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2016-02-19T23:46:52Z</dc:date>
    </item>
  </channel>
</rss>

