problem in getting the value in minutes and seconds
-
hello all I have taken a variable (int) having value as 100. Now I want to convert that value into Datetime in 1 minute 40 seconds a form. could anyone tell me how to convert the static integer value into datetime value sp that i could use that value in my project?? Thanks in advance
-
hello all I have taken a variable (int) having value as 100. Now I want to convert that value into Datetime in 1 minute 40 seconds a form. could anyone tell me how to convert the static integer value into datetime value sp that i could use that value in my project?? Thanks in advance
Why don't you create your own method with the logic of getting time out of given minutes? Using all the known things like... 1 day=24 hours, 1 hour = 60 min, 1 min=60 sec... you can do it!
-
Why don't you create your own method with the logic of getting time out of given minutes? Using all the known things like... 1 day=24 hours, 1 hour = 60 min, 1 min=60 sec... you can do it!
I have taken ajax timer control and in the "timer1_tick" event,its time interval is 1000 meaning that it will tick every second Now, my code is class abc { static int countdown = 100; protected void page_load() { } timer1_tick() { countdown--; label.Text = countdown.ToString() + "seconds remaining"; } } Now I want that label.Text should display 100 as 1 minutes 40 seconds after 1 tick it should display 1 minute 39 sec.. after 2nd tick 1 minute 38 seconds and so on... for that I want 100 value in the datetime. plz help
-
hello all I have taken a variable (int) having value as 100. Now I want to convert that value into Datetime in 1 minute 40 seconds a form. could anyone tell me how to convert the static integer value into datetime value sp that i could use that value in my project?? Thanks in advance
-
It's even easier to get the time in seconds or minutes by writing your own custom function
could you give one example for that
-
could you give one example for that
Its very simple buddy.
int min = 100/60;
int sec = 100%60;just do like this.
-
hello all I have taken a variable (int) having value as 100. Now I want to convert that value into Datetime in 1 minute 40 seconds a form. could anyone tell me how to convert the static integer value into datetime value sp that i could use that value in my project?? Thanks in advance
Do you really want a date and time? I think what you are seeking is a TimeSpan. TimeSpan x = TimeSpan.FromSeconds(100);