title: How to convert between date formats in Erlang?
body: <p>I have a function ( named <strong>test</strong>) which return a date </p>
  
  <p>I give you an example of this kind of return : <strong>"01-Jun-2012"</strong></p>
  
  <p>Now I want to make this date in this form   month/year</p>
  
  <p>so "01-Jun-2012"  should became  <strong>"06/2012"</strong></p>
  
  <p>because  I want to use this Date to  send sms </p>
  
  <pre><code>send(To,Date) -&gt;
  Message =io_lib_format("pr%EAt %E0 payer le ~s",[Date]),
      Url = io_lib:format("http://192.168.1.8/sendsms?tel=~s&amp;text=~s", [To, Message]),
       http:request(lists:flatten(Url), sms).
  </code></pre>
  
  <p>as I say the function <strong>test</strong> return a date for example in this form <strong>"01-Jun-2012"</strong></p>
  
  <p>an I should convert this form to another form  <strong>month/year</strong> ( as result to my example 06/2012)</p>
  
  <p>I think I should develop a function which has as a parameter a Date in this form ( day-month-year) an as a result for this function a date in this form  month/year</p>
  
  <p>note, I give you same example of date which should be convert :  02-Jan-2012  , 01-Feb-2012 ,01-Mar-2012 ,02-Apr-2012 , 01-May-2012 , 01-Jun-2012</p>
  
  <p>as I say the function <strong>test</strong> return this kind of date ( in the code of <strong>test</strong> I execute http request in order to return this kind of date  day-month-year ( is a return of php script, </p>
  
  <hr>
  
  <p>thanks , but when I test with ec_date:parse    I have this error    <code>** exception error: undefined function ec_date:parse/1</code></p>
  
  <p>note , that I work with version 13 of erlang         </p>
  
  <pre><code>Erlang R13B03 (erts-5.7.4) [source] [rq:1] [async-threads:0] [hipe] [kernel-poll:false]
  
  Eshell V5.7.4  (abort with ^G)
  </code></pre>