title: Timestamp format from dateTimePicker with hours
body: <p>I want to convert datetime from a datetimepicker to unix timestamp but with options to select a specified hour and minutes from a textbox and then to be show in other textbox. Here is my code so far for make a timestamp fot a date:</p>
  
  <pre><code>public static long ToUnixTimestamp(DateTime target)
      {
          var date = new DateTime(1970, 1, 1, 0, 0, 0, target.Kind);
          var unixTimestamp = System.Convert.ToInt64((target - date).TotalSeconds);
  
          return unixTimestamp;
      }
  
      public static DateTime ToDateTime(DateTime target, long timestamp)
      {
          var dateTime = new DateTime(1970, 1, 1, 0, 0, 0, target.Kind);
  
          return dateTime.AddSeconds(timestamp);
      }
  
      private void button1_Click(object sender, EventArgs e)
      {
          DateTime dt = this.dateTimePicker1.Value.Date;
          textBox1.Text = string.Format("{0}", ToUnixTimestamp(dt));
  
      }
  </code></pre>
  
  <p>Thank you in advance</p>