On 03/19/2013 11:32 AM, Ted Roche wrote:
On Sat, Mar 16, 2013 at 10:55 AM, Jeff Johnson <[email protected]> wrote:
I need an empty datetime(). I've come up with the following only it won't
do math.
I don't really need to do the above calculations. I just want to be able
to check for EMPTY(mydatetime) which the above does.
Jeff:
I find your question confusing. Test EMPTY({ / / : : }) and it returns .T.
for an empty datetime. So, set lEmptyDateTime = { / / : : } and you've got
your empty datetime.
You can't do math with an empty datetime. It has no value.
Think of EMPTY as yet-another quirky Fox only thing where a variable has a
type but not an assigned value, but it's not NULL, though it probably
should be.
Testing YEAR(), MONTH() DAY() and the time functions against an empty
datetime all return zero.
Thanks to all of your help, I understand now. My original question was
that even though I have known for some time that {//} was and empty date
I could not find an empty datetime(). Which I now know can be { / / : :
}or {/:}.
To answer your questions as to why I would want to do math on dates:
for over twenty years I have been developing applications for onboard
computers in trucks. All of the data I am working with is time stamped
in any number of formats and I work with about eight different
manufacturers. When I went from VFP7 to VFP9 I met the STRICTDATE
function. I wrapped many of the VFP functions in VFP7 to work with VFP9
like DTOC I have a _DTOC which complies with STRICTDATE.
I was just stumped on an empty DATETIME()
Thanks again,
Jeff
---------------
Jeff Johnson
[email protected]
(623) 582-0323
www.san-dc.com
www.arelationshipmanager.com
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: http://mail.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.