Jump to content
Server Maintenance This Week. ×

date calculation question


This topic is 7331 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Can someone tell me how I solve this problem

I need to add a field to a database that shows the creation record date (i already have set this up to automatically create this with every new record) + 11 months.

Also I need to create a field that shows a telephone number from another field but without the '-' between the code and rest of the number.

any help would be appreciated as I am desperate.

Version: v5.x

Platform: Mac OS 9

Link to comment
Share on other sites

Hello Robert,

As regards your first request, I suggest that you define a new field as an auto-enter-by-calculation date field and (assuming your creation date fields is called 'DateCreated'), enter the following formula:

Date(Month(DateCreated) + 11, Day(DateCreated), Year(DateCreated))

- which will work even if the eleven month period runs over into the next year (as it frequently will).

Your second question is fairly straightforward. You can eliminate the '-' by using a calculation such as:

Substitute(YourPhoneNumberField, "-", "")

That will work if you want to remove *all* ocurrences of the '-' character from the phone number. If you want to remove only the first occurrence, then you'll need a slightly more complex calc such as:

Replace(YourPhoneNumberField, Position(YourPhoneNumberField, "-", 1, 1), 1, "")

See how you go with the above suggestions, and sing out if you are still having problems. wink.gif

Link to comment
Share on other sites

This topic is 7331 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.