title: send current date to Api using typescript in format (DateTime)
body: <p>how can I send current date to API using typescript in a specific format (DateTime) 
  when I send date to API, it's sent in this format so I got the error. </p>
  
  <p>my ts code: </p>
  
  <pre><code>date: Date;
  constructor( private dataStorageService: DataStorageService) {
      this.date = new Date();
  }
  onSubmit(Message , form : FormGroup){
      let newMsg = {
          username: Message.username,
          header: Message.header,
          content: Message.content,
          file: Message.file
      }
    this.dataStorageService.postMessage(newMsg, this.Id , this.date).subscribe(data =&gt; {
        console.log('done');
        console.log(this.date);
        }, error =&gt; {
            console.error("Error saving jobs!");
        })
  }
  </code></pre>
  
  <p><a href="http://api.azharcouncil.com/api/notification/PostNotification?user_id=15&amp;Header=hj&amp;Content=hjh&amp;File_Path=null&amp;" rel="nofollow noreferrer">http://api.azharcouncil.com/api/notification/PostNotification?user_id=15&amp;Header=hj&amp;Content=hjh&amp;File_Path=null&amp;</a><strong>date=Wed%20Nov%2015%202017%2010:44:56%20GMT+0200%20(Egypt%20Standard%20Time)</strong></p>
  
  <p>So my request is invalid because of the date format...</p>