Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

How to change date to datetime on entry (Validation by Calculation)?


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

Recommended Posts

Posted

I'm in a test scenerio with FileMaker 9 Adv, and FileMaker 9 Adv Server.

I have my Layout populated with live SQL fields. One of which is a 'Delivery Date' field. With SQL being the back-end if I enter in "7/9/2008" it yells at me saying that it wants the format to read "7/9/2008 12:00:00 AM" or something to that extent...

Is there a way I can do a Validate by Calculation on that field so if the user enters in just a date without a time it appends on a "12:00:00 AM"?

I'm at a loss here.. This could be a deal breaker for me using SQL Server as my back-end. If I'm going to require the end user to key in a time along with their dates it's just not practical. :

Posted

If you're using a FileMaker field for entry, you can try this. First, the field type will have to make sense -- it sounds like a timestamp field is what you're using, or maybe you could try text if it doesn't fit a timestamp.

In the FileMaker field definitions, click the [color:blue]"Options" button for your field and go to the [color:blue]"Auto-Enter" tab. Check the box for [color:blue]"Calculated value", but UNcheck the box just below it for [color:blue]"Do not replace existing value for field..." Under the calculation, set up a calculation that references the field itself.

For example, if the field name is "DateField", the calculation would be something like:

[color:blue]DateField & "12:00 AM"

Hope that helps, if not say so & someone else will probably post something better.

:

Posted

I've the exact same problem and no, that trick didn't work on mine. Any more ideas? Is there some way in a custom formula to see if a timestamp is missing its time and then append one to fix it?

Thanks!

-jim lee

This topic is 5976 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.