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 Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Creating an Error checking Formula

Status
Not open for further replies.

Viscount

IS-IT--Management
Oct 10, 2003
85
GB
I have an interesting little problem.

I have got a free text field in a SQL2000 database. The field, called time, is used to show an appointment time.

But - it is also used to show how long till the next appointment - i.e. 6 Months, 2 Years, 1 Week etc.

I want to show the appointment times for a set day (date is a seperate field) in the right order.

I think that I need a formula that says...

if date = a real date then DateValue(Date) else "UNK"

Can anyone tell what I should put in so that it tells me if it is a 'Real Date' or not.

Thanks

Vis.
 
In Crystal 8.5, NumericText({file.item}) will be true if the text is a number, and otherwise false.

Or you could look for the strings, e.g. Mid({file.item}, 3, 6) = "Months".

You'll find DateAdd useful for translating values like "1 Week" into an actual date based on the currentdate (or whatever date it is that you use).

[yinyang] Madawc Williams (East Anglia, UK) [yinyang]
 
Thanks for the help.

I think that I managed to solve the problem by using startswith "0,10,11,12,13,14,15,16,17,18" and then playing around with a couple of formuleas to put the finishing touches to it.

Vis
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top