<?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: convert date and time IST to EST in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-convert-the-date-and-time-from-IST-to-EST/m-p/345292#M79424</link>
    <description>Hi KurtBremser, I want both variable (original_date) and (time_ist) should be concatenated in new column (Date_time) and also convert into EST format</description>
    <pubDate>Wed, 29 Mar 2017 09:50:43 GMT</pubDate>
    <dc:creator>sivastat08</dc:creator>
    <dc:date>2017-03-29T09:50:43Z</dc:date>
    <item>
      <title>How to convert the date and time from IST to EST?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-convert-the-date-and-time-from-IST-to-EST/m-p/345276#M79414</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hi ,I want to convert &lt;STRONG&gt;Date_time &lt;/STRONG&gt;character variable&lt;STRONG&gt;(IST)&lt;/STRONG&gt; to &lt;STRONG&gt;EST &lt;/STRONG&gt;(date and time format) .please help me.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;TABLE&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD&gt;original_date&lt;/TD&gt;
&lt;TD&gt;time_ist&lt;/TD&gt;
&lt;TD&gt;Date_time&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;28/12/2016&lt;/TD&gt;
&lt;TD&gt;3:06:36&lt;/TD&gt;
&lt;TD&gt;28DEC2016/3:06:36&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;11/11/2016&lt;/TD&gt;
&lt;TD&gt;19:56:35&lt;/TD&gt;
&lt;TD&gt;11NOV2016/19:56:35&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;11/11/2016&lt;/TD&gt;
&lt;TD&gt;19:55:58&lt;/TD&gt;
&lt;TD&gt;11NOV2016/19:55:58&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;11/11/2016&lt;/TD&gt;
&lt;TD&gt;19:53:25&lt;/TD&gt;
&lt;TD&gt;11NOV2016/19:53:25&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;11/11/2016&lt;/TD&gt;
&lt;TD&gt;19:55:26&lt;/TD&gt;
&lt;TD&gt;11NOV2016/19:55:26&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;11/11/2016&lt;/TD&gt;
&lt;TD&gt;19:51:53&lt;/TD&gt;
&lt;TD&gt;11NOV2016/19:51:53&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;11/11/2016&lt;/TD&gt;
&lt;TD&gt;19:52:25&lt;/TD&gt;
&lt;TD&gt;11NOV2016/19:52:25&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;16/11/2016&lt;/TD&gt;
&lt;TD&gt;14:00:56&lt;/TD&gt;
&lt;TD&gt;16NOV2016/14:00:56&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;16/11/2016&lt;/TD&gt;
&lt;TD&gt;13:25:02&lt;/TD&gt;
&lt;TD&gt;16NOV2016/13:25:02&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;16/11/2016&lt;/TD&gt;
&lt;TD&gt;15:23:54&lt;/TD&gt;
&lt;TD&gt;16NOV2016/15:23:54&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;16/11/2016&lt;/TD&gt;
&lt;TD&gt;14:00:18&lt;/TD&gt;
&lt;TD&gt;16NOV2016/14:00:18&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;16/11/2016&lt;/TD&gt;
&lt;TD&gt;13:08:55&lt;/TD&gt;
&lt;TD&gt;16NOV2016/13:08:55&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;16/11/2016&lt;/TD&gt;
&lt;TD&gt;16:21:36&lt;/TD&gt;
&lt;TD&gt;16NOV2016/16:21:36&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks,&lt;/P&gt;
&lt;P&gt;Siva&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 04 Jun 2021 20:48:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-convert-the-date-and-time-from-IST-to-EST/m-p/345276#M79414</guid>
      <dc:creator>sivastat08</dc:creator>
      <dc:date>2021-06-04T20:48:56Z</dc:date>
    </item>
    <item>
      <title>Re: convert date and time IST to EST</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-convert-the-date-and-time-from-IST-to-EST/m-p/345278#M79415</link>
      <description>&lt;P&gt;Do&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want;
set have;
original_date = datepart(input(date_time,datetime20.));
time_ist = timepart(input(date_time,datetime20.));
format
  original_date ddmmyy10.
  time_ist time8.
;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 29 Mar 2017 08:35:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-convert-the-date-and-time-from-IST-to-EST/m-p/345278#M79415</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2017-03-29T08:35:09Z</dc:date>
    </item>
    <item>
      <title>Re: convert date and time IST to EST</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-convert-the-date-and-time-from-IST-to-EST/m-p/345279#M79416</link>
      <description>&lt;P&gt;Thanks sir.&lt;/P&gt;</description>
      <pubDate>Wed, 29 Mar 2017 08:37:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-convert-the-date-and-time-from-IST-to-EST/m-p/345279#M79416</guid>
      <dc:creator>sivastat08</dc:creator>
      <dc:date>2017-03-29T08:37:07Z</dc:date>
    </item>
    <item>
      <title>Re: convert date and time IST to EST</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-convert-the-date-and-time-from-IST-to-EST/m-p/345292#M79424</link>
      <description>Hi KurtBremser, I want both variable (original_date) and (time_ist) should be concatenated in new column (Date_time) and also convert into EST format</description>
      <pubDate>Wed, 29 Mar 2017 09:50:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-convert-the-date-and-time-from-IST-to-EST/m-p/345292#M79424</guid>
      <dc:creator>sivastat08</dc:creator>
      <dc:date>2017-03-29T09:50:43Z</dc:date>
    </item>
    <item>
      <title>Re: convert date and time IST to EST</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-convert-the-date-and-time-from-IST-to-EST/m-p/345294#M79426</link>
      <description>&lt;P&gt;Consulting wikipedia, the only date/time-related uses of the acronym EST are Eastern Standard Time and European Summer Time. Do you want to factor in a timezone?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Otherwise describe how the final variable should be formatted. When dealing with such values, it's usually best to keep the value as a true SAS datetime value (seconds from 1960-01-01T00:00:00) and use an appropriate format (you can even create a custom one yourself).&lt;/P&gt;</description>
      <pubDate>Wed, 29 Mar 2017 09:56:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-convert-the-date-and-time-from-IST-to-EST/m-p/345294#M79426</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2017-03-29T09:56:49Z</dc:date>
    </item>
    <item>
      <title>Re: convert date and time IST to EST</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-convert-the-date-and-time-from-IST-to-EST/m-p/345298#M79428</link>
      <description>&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;original_date&lt;/TD&gt;&lt;TD&gt;time_ist&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;28/12/2016&lt;/TD&gt;&lt;TD&gt;3:06:36&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here original date is &lt;STRONG&gt;28/12/2016 and ist time is 3:06:36&lt;/STRONG&gt; which is Indian Standard Time (IST), I want to convert it to &lt;STRONG&gt;27/12/2016 and 17:06:36&lt;/STRONG&gt; Estern Standard Time (EST (USA/Canada)).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 29 Mar 2017 10:06:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-convert-the-date-and-time-from-IST-to-EST/m-p/345298#M79428</guid>
      <dc:creator>sivastat08</dc:creator>
      <dc:date>2017-03-29T10:06:54Z</dc:date>
    </item>
    <item>
      <title>Re: convert date and time IST to EST</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-convert-the-date-and-time-from-IST-to-EST/m-p/345316#M79440</link>
      <description>&lt;P&gt;Well, IST is UTC+5:30, while ET (or EST) is UTC-5, so we have to subtract 10:30 from IST time to get the correct timestamp for ET:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want;
input date_time :$20.;
dt_time = input(date_time,datetime20.);
format dt_time e8601dt20.;
dt_time = dt_time - '10:30:00't;
cards;
28DEC2016/3:06:36
11NOV2016/19:56:35
11NOV2016/19:55:58
11NOV2016/19:53:25
11NOV2016/19:55:26
11NOV2016/19:51:53
11NOV2016/19:52:25
16NOV2016/14:00:56
16NOV2016/13:25:02
16NOV2016/15:23:54
16NOV2016/14:00:18
16NOV2016/13:08:55
16NOV2016/16:21:36
;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;You now have a datetime value for Eastern Time, and can use datepart() and timepart() to extract the ET date and time values from that.&lt;/P&gt;</description>
      <pubDate>Wed, 29 Mar 2017 11:01:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-convert-the-date-and-time-from-IST-to-EST/m-p/345316#M79440</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2017-03-29T11:01:47Z</dc:date>
    </item>
    <item>
      <title>Re: convert date and time IST to EST</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-convert-the-date-and-time-from-IST-to-EST/m-p/345323#M79445</link>
      <description>Thank you very much for your time</description>
      <pubDate>Wed, 29 Mar 2017 11:17:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-convert-the-date-and-time-from-IST-to-EST/m-p/345323#M79445</guid>
      <dc:creator>sivastat08</dc:creator>
      <dc:date>2017-03-29T11:17:50Z</dc:date>
    </item>
  </channel>
</rss>

