By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,987 Members | 1,552 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,987 IT Pros & Developers. It's quick & easy.

How to convert integers to time

P: 2
Hi,

I have 3 integers they are the following

int startT1H = 05
int startT1M = 00
int startT1S = 00

I realise you cant have the zero before the number 5 in the first integer because it will just delete it. Nor are you able to have integers 00, but the reason I show you it like this is because i want to convert the integers to a time. The shown integers will not always be displayed as zeros but my start time is at 5 o'clock hence the 05.

Thank you for any help on this subject.
Feb 9 '09 #1
Share this Question
Share on Google+
3 Replies


P: 12
are you not able to use DateTime. Why you want to use 05 in place of 5?
Feb 10 '09 #2

Expert 100+
P: 750
PRR
You can use DateTime.Parse for conversion... You cant directly convert int to date time ...
Feb 10 '09 #3

P: 2
thank you i have got round it now
Feb 10 '09 #4

Post your reply

Sign in to post your reply or Sign up for a free account.