Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Exact same dates not equal ???
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00844225
Message ID:
00844306
Views:
20
>So how did this parameter get calculated? A date field in a table/view/cursor can't store the fractional part, but a memory value can and you can't see it!

Thats it !!

I am using the passed in dTargetDate like so...

Parameters dTargetBeginDate , dTargetEndDate , oAvblForm

cHTM4AvailableUnits = This.getHTMLStr("avblUnitsTablePage")
iDays2Show = 24

iStayLen = dTargetEndDate - dTargetBeginDate

*-- This number can be a fractional, I'll change this to force an INT()
iEachSideDays = (iDays2Show-iStayLen )/2

*-- Figure out what the middle is
dDate2Match = dTargetBeginDate - iEachSideDays
dDate2ShowEnd = dDate2ShowBegin + ( iDays2Show - 1 )


Thanks !!

PS How come the ttod()'s matched ???


GReg




>
>>
>>
>>>>Hi All,
>>>>
>>>>I am comparing 2 dates and getting unexpected results:
>>>>
>>>>Here is what is displayed in the Debugger watch window:
>>>>
>>>>
>>>>
>>>>c_ScanCursor.dDateField {5/21/2004}
>>>>dDate2Match {5/21/2004}
>>>>c_ScanCursor.dDateField = dDate2Match .F.
>>>>vartype(c_ScanCursor.dDateField) "D"
>>>>vartype(dDate2Match) "D"
>>>>SET("Strictdate") 0
>>>>
>>>>
>>>>
>>>>What Gives ???
>>>>
>>>>TIA
>>>>
>>>>Greg
>>>
>>>Were either of your two dates the result of a calculation? If so, make sure that only INTEGERS get added to your date values as it can cause a problem if there is any decimal portion added.
>>>
>>>dDate1 = DATE()
>>>dDate2 = DATE() + 0.01
>>>
>>>? dDate1, dDate2  && they look the same
>>>? dDate1=dDate2   && Shows .F.
>>>
Greg Foote
Software At Work, Inc.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform