Mike, Not sure if this is what you want. But you could pass your dates (converted to strings first) to this function to test them before doing the labelling:
Function IsDate(sDateText as string) as logical OnError goto Error_IsDate dim iDay as smallint iDay = Day(sDateText) IsDate = True Exit function Error_IsDate: IsDate = False End Function Cheers David Llewellyn -----Original Message----- From: Cummings, Mike [mailto:[EMAIL PROTECTED] Sent: Wednesday, 11 January 2006 4:37 AM To: MapInfo-L (E-mail) Subject: [MI-L] labels & formatdate$() We have databases were we record start and ending dates. I need to be able to query records and have the dates in the label. I have found that null values in these date fields are troublesome. For example: If I use the formatdate$(abddate) to display the date in a format that is easy to read and abddate=null; I get an error message instead of a label. So I tried to make different layers-one non-null & one null. I couldn't quite get it right, there always seemed to be records "fall through the cracks". (there isn't a isnull() function) I have looked for a solution and haven't found much. At this point, I believe that I'm going to have to query the data into different layers (if I want to use the formatdate$() function). How do I separate the null date values from non-null date values? Can you put a conditional statement in a label expression? thanks. _______________________________________________ MapInfo-L mailing list MapInfo-L@lists.directionsmag.com http://www.directionsmag.com/mailman/listinfo/mapinfo-l ***This Email, together with any attachments is intended for the addressee only. If you have received this Email in error please inform the sender immediately by return Email. Alternatively you can ring the National Native Title Tribunal on the toll free number 1800 640 501 and report the error. Please delete the Email and any copies from your computer and/or computer network. The Tribunal does not warrant that this email is virus free. The Tribunal has also implemented content filtering of Emails to restrict inappropriate and spam emails being received. Other emails which may contain viruses may also be blocked. In either case, and in any case the email may not reach its intended recipient. If the email is important you may wish to see confirmation of its receipt by placing that request in the text of the email. Please resend the email if you haven't received that confirmation as requested. *** _______________________________________________ MapInfo-L mailing list MapInfo-L@lists.directionsmag.com http://www.directionsmag.com/mailman/listinfo/mapinfo-l