New topic: Convert date.totalseconds back to date
<http://forums.realsoftware.com/viewtopic.php?t=32409> Page 1 of 1 [ 4 posts ] Previous topic | Next topic Author Message rlinsurf Post subject: Convert date.totalseconds back to datePosted: Mon Feb 08, 2010 8:00 pm Joined: Tue Mar 21, 2006 12:49 am Posts: 196 Now I have this line, which is attempting to calculate a future date base on today's date: d.totalSeconds + 60*60*24*16 I this will calculate 16 days ahead, but this isn't in the form of a date. Top tomsi Post subject: Re: Convert date.totalseconds back to datePosted: Mon Feb 08, 2010 8:07 pm Joined: Wed Nov 16, 2005 4:58 pm Posts: 65 Location: Sandvika, Norway try this Code:dim d2 as new date d2.totalSeconds = d.totalSeconds + 60*60*24*16 There is a lot of neat information on the Date class in the Language reference (aka. LR). edit: if you want to update d, use: d.totalSeconds = d.totalSeconds + 60*60*24*16 Top serd83 Post subject: Re: Convert date.totalseconds back to datePosted: Mon Feb 08, 2010 8:08 pm Joined: Thu Feb 22, 2007 7:08 pm Posts: 883 Why not use something like this direct: Code:dim d as new date msgbox str(d.day+16) Top rlinsurf Post subject: Re: Convert date.totalseconds back to datePosted: Mon Feb 08, 2010 9:14 pm Joined: Tue Mar 21, 2006 12:49 am Posts: 196 Thanks. That works perfectly Top Display posts from previous: All posts1 day7 days2 weeks1 month3 months6 months1 year Sort by AuthorPost timeSubject AscendingDescending Page 1 of 1 [ 4 posts ] -- Over 1500 classes with 29000 functions in one REALbasic plug-in collection. The Monkeybread Software Realbasic Plugin v9.3. http://www.monkeybreadsoftware.de/realbasic/plugins.shtml [email protected]
