Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » Elevate Web Builder Technical Support » Support Forums » Elevate Web Builder General » View Thread |
Messages 1 to 6 of 6 total |
DateTime manipulation |
Thu, Jun 13 2013 1:07 PM | Permanent Link |
Matthew Jones | The help says "Date/time types are actually just 32-bit integers, so they can be
manipulated just like the Integer type." This does not appear to be consistent. I am trying to get yesterday's date, using: DayOf(tmToday - 1) but I get an error "Expected integer or float but insteadl found tmToday". If I make that a + insteard, it compiles without problem. (I realise that I probably have to make that a day's worth of milliseconds, but that needs basic math to work on dates.) Any suggestions welcome. /Matthew Jones/ |
Thu, Jun 13 2013 5:46 PM | Permanent Link |
Walter Matte Tactical Business Corporation | >>Any suggestions welcome.
See my Julian Date Post http://www.elevatesoft.com/forums?action=view&category=ewb&id=ewb_general&msg=2471 In use: var wd : DateTime; curwd : integer; ...... wd := Date; curwd := DateToJul(wd); while ((curwd - dref) mod 14) <> 0 do begin curwd := curwd - 1; end; gbPeriodStartDate := JulToDate(curwd); gbPeriodEndDate := JulToDate(curwd + 13); Walter |
Fri, Jun 14 2013 7:04 AM | Permanent Link |
Matthew Jones | Many thanks. I have added those routines to my code. I had to go look up Julian
dates, given that in all my years of programming I've never had to use them before, thus didn't learn them. But they are of course ideal for this, and I now have my friendly date routines working. /Matthew Jones/ |
Fri, Jun 14 2013 2:10 PM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Matthew,
<< This does not appear to be consistent. I am trying to get yesterday's date, using: DayOf(tmToday - 1) but I get an error "Expected integer or float but insteadl found tmToday". If I make that a + insteard, it compiles without problem. (I realise that I probably have to make that a day's worth of milliseconds, but that needs basic math to work on dates.) >> This is now fixed. For now, just cast the tmToday as an Integer. Tim Young Elevate Software www.elevatesoft.com |
Tue, Aug 6 2013 9:41 AM | Permanent Link |
Matthew Jones | Tim,
tmTimeToRefresh := m_tmNextRefreshTime - Integer(tmNow); I cannot subtract one time from another either. Or add two times. Both would be handy. /Matthew Jones/ |
Tue, Aug 6 2013 12:10 PM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Matthew,
<< I cannot subtract one time from another either. Or add two times. Both would be handy. >> Noted. Thanks, Tim Young Elevate Software www.elevatesoft.com |
This web page was last updated on Saturday, May 4, 2024 at 12:54 AM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |