protected void MockLastBillingDateTime_Click(object sender, EventArgs e) { var controller = new AdHocController(); DateTime info = controller.GetLastBillDateTime(); // Format the DateTime object to work with the HTML5 <input type="date" /> SearchDate.Text = info.ToString("yyyy-MM-dd"); // This is the format for a date // Format the DateTime object to work with the HTML5 <input type="time" /> SearchTime.Text = info.ToString("HH:mm:ss"); // HH is 24 hour clock, hh is 12 hour clock }
protected void SetMockedTimeToLastBill() { var controller = new AdHocController(); var info = controller.GetLastBillDateTime(); SearchDate.Text = info.ToString("yyyy-MM-dd"); SearchTime.Text = info.ToString("HH:mm:ss"); }
private void SetMockedTimeToLastBill() { var controller = new AdHocController(); var info = controller.GetLastBillDateTime(); //formatting date for use in an <input type="date"> HTML5 control SearchDate.Text = info.ToString("yyyy-MM-dd"); //formatting time for use in an <input type="time"> HTML5 control SearchTime.Text = info.ToString("HH:mm:ss"); //HH is 24 hour clock,hh is 12 hour clock }