1 Replies - 11400 Views - Last Post: 27 July 2007 - 01:44 PM Rate Topic: -----

#1 getnitha  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 1
  • Joined: 18-July 07

time format

Post icon  Posted 18 July 2007 - 07:18 AM


TextBox1.Text = dr1.GetString(0)




i just want to know how to convert a number say 8 to time format 8:00:00

textbox1.text i will be getting as a number stored in sql server as a string type
Is This A Good Question/Topic? 0
  • +

Replies To: time format

#2 whisla13  Icon User is offline

  • New D.I.C Head

Reputation: 3
  • View blog
  • Posts: 10
  • Joined: 22-May 07

Re: time format

Posted 27 July 2007 - 01:44 PM

View Postgetnitha, on 18 Jul, 2007 - 07:18 AM, said:


TextBox1.Text = dr1.GetString(0)




i just want to know how to convert a number say 8 to time format 8:00:00

textbox1.text i will be getting as a number stored in sql server as a string type


Create a new DateTime structure or use DateTime.Parse to create a DateTime which holds the point in time and use DateTime.ToString("hh:mm:ss")

Andrew
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1