Solved

define date field

Posted on 2003-12-02
2
479 Views
Last Modified: 2010-04-27
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.
0
Comment
Question by:phillystyle123
2 Comments
 
LVL 1

Accepted Solution

by:
Scurv earned 75 total points
ID: 9861674
Date and Time are different variables in FMP. This should give you want you want:

DateToText(Status(CurrentDate)) & " " & TimeToText(Status(CurrentTime))

It will automatically be formatted to your computers regional settings (e.g. American, English). If you want to change how it looks then you need to do some clever month, day, year extractions and then recompile in the correct order.
0
 
LVL 3

Expert Comment

by:Mariano_Peterson
ID: 9869583
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
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Pop up windows can be a useful feature of any Filemaker database.  Though best used sparingly, they can be employed in a multitude of different ways, for example;  as a splash screen at login, during scripted processes to control user input, as pick…
Problem: You have a hosted FileMaker database and users are tired of having to use Open Remote or Open Recent to access the database. They say, "can't you just give us something to double-click on rather than have to go through those dialogs?" An…
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

803 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question