Thankx lnMin = Mod(Int(tValue/60),60) is giving 15.
Ajoy Khaund Neamati Road Near Bhogdoi Bridge Jorhat 785 001 Assam, India Tel: 91-376-2351288 Cell: 91-94350-92287 Mail: [EMAIL PROTECTED] Mail: [EMAIL PROTECTED] "Walking on water and developing software from a specification are easy if both are frozen." - Edward V. Berard, "Life-Cycle Approaches" ----- Original Message ----- From: "Sietse Wijnker" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, September 05, 2007 1:06 PM Subject: RE: INT(15.0000) = 14 VFP8 > Hi Ajoy, > > Here's my take on it: > *- Calculate the time based today at 00:00 by adding the seconds to the > datetime > ltDateTime = DTOT(DATE()) + lnSec > lcDiff = Padl(HOUR(ltDateTime),2,'0') + ":" + > Padl(MINUTE(ltDateTime),2,'0') > > > B.t.w. I didn't see the lnMin part change to 14. > > Regards, > Sietse Wijnker > > > -----Oorspronkelijk bericht----- > Van: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] > Namens Ajoy Khaund > Verzonden: woensdag 5 september 2007 5:18 > Aan: [EMAIL PROTECTED] > Onderwerp: INT(15.0000) = 14 VFP8 > > Hi All > I have a function to convert seconds to hours & minutes. > Sending a value of 22500 > > Lparameters tValue > > *Converting seconds to Hours & Minutes > > Local lnHour,lnMin,lcDiff > > lnHour = INT(tValue/3600) > lnMin = INT((tValue - (lnHour*3600))/60) > lcDiff = Padl(lnHour,2,'0') + ":" + Padl(lnMin,2,'0') > > lnHour comes 9 (OK), lnMin comes 14 (Must be 15) > > lnHour = INT(tValue/3600) > lnMin = (tValue - (lnHour*3600))/60 > lnMin = INT(lnMin) > Here in Step lnMin is 15.0000 > In step 4 it becomes 14. > > Where am I going wrong. > > > > > > Ajoy Khaund > Neamati Road > Near Bhogdoi Bridge > Jorhat 785 001 > Assam, India > > Tel: 91-376-2351288 > Cell: 91-94350-92287 > Mail: [EMAIL PROTECTED] > Mail: [EMAIL PROTECTED] > > "Walking on water and developing software from a specification are easy if > both are frozen." > - Edward V. Berard, "Life-Cycle Approaches" > > --- StripMime Report -- processed MIME parts --- > multipart/alternative > text/plain (text body -- kept) > text/html > --- > [excessive quoting removed by server] _______________________________________________ Post Messages to: [email protected] Subscription Maintenance: http://leafe.com/mailman/listinfo/profox OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech Searchable Archive: http://leafe.com/archives/search/profox This message: http://leafe.com/archives/byMID/profox/[EMAIL PROTECTED] ** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.

