473,806 Members | 2,697 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

convert minutes to day

I need a function which converts minutes to day: for instance

X(14400)=10 days
X(14406)=10 days and 6 minutes

Do we have such a function or I have to write it my self?
Nov 20 '05 #1
5 1282
* "Reza Alirezaei" <an*******@disc ussions.microso ft.com> scripsit:
I need a function which converts minutes to day: for instance

X(14400)=10 days
X(14406)=10 days and 6 minutes

Do we have such a function or I have to write it my self?


Have a look at the 'Mod' and '\' operators and remember that 1 hour has
60 minutes and one day 24 hours.

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>
Nov 20 '05 #2
On 2004-04-30, Reza Alirezaei <an*******@disc ussions.microso ft.com> wrote:
I need a function which converts minutes to day: for instance

X(14400)=10 days
X(14406)=10 days and 6 minutes

Do we have such a function or I have to write it my self?


Dim ts As New TimeSpan(0, 14400, 0);
Console.WritLin e(ts);

--
Tom Shelton [MVP]
Powered By Gentoo Linux 1.4
"Ah, " said Arthur, "this is obviously some strange usage
of the word safe that I wasn't previously aware of. "
Nov 20 '05 #3
Hi Herfried,
remember that 1 hour has
60 minutes and one day 24 hours.

Thank you very much for this information.
Is that what you learn on the university of Wien

:-)

Cor
Nov 20 '05 #4
"Reza Alirezaei" <an*******@disc ussions.microso ft.com> schrieb
I need a function which converts minutes to day: for instance

X(14400)=10 days
X(14406)=10 days and 6 minutes

Do we have such a function or I have to write it my self?


dim ts as timespan
ts = new timespan(0, minutes, 0)
'access ts members here
--
Armin

How to quote and why:
http://www.plig.net/nnq/nquote.html
http://www.netmeister.org/news/learn2quote.html
Nov 20 '05 #5
* "Cor Ligthert" <no**********@p lanet.nl> scripsit:
remember that 1 hour has
60 minutes and one day 24 hours.


Thank you very much for this information.
Is that what you learn on the university of Wien


I think I learned that when I was 5 ;-).

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>
Nov 20 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
81024
by: Rudi Groenewald | last post by:
Hi all. If I've got a query which has a field with seconds in it... how will I use the Convert function to get my field converted to the format: HH:MM:SS ? The field with the seconds in is called: "Diff" Thanks alot
2
32880
by: James P. | last post by:
Hello, In my Access report, I have a minutes field in the detail line. How do I convert that minute to hour and minute. The problem for me now is if I take the minutes, say 75 divide by 60, it gives me 1.25; or 90/60 = 1.50. These are not what the user wants. They want to have hour and minutes, say 75 minutes, needs to convert to 1.15 (1 hour 15 minutes); or 90 minutes to 1.30, and so on.
2
1286
by: Chris | last post by:
Hi, Can someone convert this to VB.NET Please. I am trying but for some reason it doesn't work. if (null != Request.QueryString) { secondsToWait = Request.QueryString; if ((Int32.Parse(secondsToWait) % 60 == 0)
7
2704
by: tshad | last post by:
Is there a quick function in vb out there that will convert seconds to minutes and seconds? Thanks, Tom
2
6754
by: 00_CP_D12 | last post by:
Is there an easy way in ASP.NET to convert seconds to Hours: Minutes: Seconds? For example, 65 seconds will return 0 hr, 1 min, 5 secs. Thanks...
3
5968
by: sparkle | last post by:
Hi, Does anybody know how to convert date to ticks from a dateTimePicker? What I'm using now isn't working. I'm trying to use a dateTimePicker to set an appointment in Outlook with a reminder. I need this reminder to remind the recipient 14 days in advance. I'm having problems with the ReminderMinutesBeforeStart. If I simply
29
2649
by: Jan | last post by:
Hi: I have an Access database that's been running (in one form or another) for a couple of different clients for a few years. Now a new client has requested that it be implemented with a SQL server back-end. I'm doing my best to learn about SQL server, and I plan to leave the front-end more or less as-is, just linking to the SQL server back end, but here's a basic question: The db has a front-end linked to two back-ends. One of the...
7
14973
by: WorldIsEnding | last post by:
Hey, Im having trouble with converting a Numeric value (such as a single digit number like 1 or 5) into a time format. I need to convert a number entered into a variable into Hours on the first form, then from Hours into Seconds when a second form is loaded. Anyone got any ideas? If you need more info, let me know and ill post a code snippet or something.
11
12347
by: davidj411 | last post by:
i am parsing a cell phone bill to get a list of all numbers and the total talktime spend on each number. i already have a unique list of the phone numbers. now i must go through the list of numbers and add up the totals for each number. on the bill, each line has a few fields,one field containing the phone number, another field containing the number of minutes on that call. the bill is comma delimited.
3
6359
by: =?Utf-8?B?U2hlbGRvbg==?= | last post by:
Hello - I have various times formatted like 00:00:00, so for example, 01:32:05 would be one thirty-two with five milliseconds. I need to convert this into seconds (an integer). First of all, I have been unable to use the mid() function like I did in vb 6.
0
9598
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10623
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10371
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10373
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10111
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6877
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
4330
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3852
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3010
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.