Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Null Date

Status
Not open for further replies.

FoxEgg

Programmer
Mar 24, 2002
749
AU
Hi All

I am converting a FoxPro prg to VFP

I have used a null date example : date123 = {00/00/0000} in the original (so a display shows '00/00/0000'}

So I changed the lines to {^0000/00/00} or {^0000-00-00} and VFP doesn't like it. (I have used {^2000/01/01} which works... but it will mean a lot more programming effort.

Is there any way that I can create a 'null' date variable ?
It would save me a lot of re- programming time ...

Appreciate thoughts

Seasons best

JF
 
First of all, the term "null date" is not what you want. You are asking how to create an empty date. Doing is so is very easy. Instead of {^0000/00/00} or {^0000-00-00}, simply use [tt]{}[/tt].

A null date is something different. Although it is useful to use null dates, it does have implications for your programming, so I suggest you stay away from them until you are more comfortable with the concepts.

Mike





__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips and downloads
 
Thanks Mike,

((Love that international time difference))

I probably should have used {} when I wrote the original in FPDos
I shall stay away from "null dates"

JF
 
Just a variation to put it here:
use can use:

Code:
ldDate =  CTOD('')

Ez Logic
Michigan
 
I shall stay away from "null dates"

You should widen that and stay away from "null values" of all data types until you've fully come to grips with the meaning. [wink]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top