Link to home
Start Free TrialLog in
Avatar of phillystyle123
phillystyle123Flag for United States of America

asked on

define date field

i have a Date field that i've imported and it looks like this:

11/19/2003 16:10:07

if the field is called "Date"
how do i define it  - i want it to be mm/dd/yyyy and Now() so a timestamp when someone enters a new field in a db.
ASKER CERTIFIED SOLUTION
Avatar of Scurv
Scurv

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Mariano_Peterson
Mariano_Peterson

As Scruv mentioned, you have to create two fields in FileMaker to store a date-stamp: DateStamp and TimeStamp.  In the field definitions for the fields (File > Define Fields) double click on the DateStamp field; then in the "Auto-Enter" tab of the resulting dialog box, select the first option ("the Creation Date").  You can change "Creation Date" to "Modification Date".  This will cause the field to be udpated with the current date every time the record is updated.  Do the same for your TimeStamp field.

If you want to retain your imported data you'll have to use the Replace command with a calculated result, then define a calc like: LeftWords(oldDateTimeStamp, 3) to extract the date portion.  Then do the same for the time.  You might have to wrap textToDate( ) and textToTime( ) around the leftWords( ) and rightWords( ) calcs for this to work.  Good luck,

Mariano