Brian Dunning's FileMaker Custom Functions

DateTimeString ( theDate, theTime )

Turns any Date and Time into a STRING to be used for searching by range

  Average rating: 4.3 (30 votes) Log in to vote

Don Wieland   Don Wieland
D W D a t a C o n c e p t s

Share on Facebook Share on Twitter

  Sample input:
DateTimeString(4/15/2004, 1:00:59)
  Sample output:

  Function definition: (Copy & paste into FileMaker's Edit Custom Function window)

Turns any Date and Time into a concatenated STRING to be used for searching by range.

For example, if you had an Appt. database with a ApptDate and StartTime, you could define a field:

DTStamp - (Calculation, Number Result) = DateTimeString(ApptDate, StartTime)

Now when you do your reports and finds, you no longer struggle with doing multiple find request but simply use this function to build a range. If you wanted to find all Appts. from right now to 2 weeks from now, simply setup you script like so:

Enter Find Mode []

Set Field [DTStamp,

DateTimeString ( Get ( CurrentDate ); Get ( CurrentTime ) )
& "..." &
DateTimeString ( Get ( CurrentDate ) + 14; Get ( CurrentTime ) ) ]

Perform Find []

Simple. Enjoy!!!



Log in to post comments.


Note: these functions are not guaranteed or supported by Please contact the individual developer with any questions or problems.

Support this website.

This library has been a free commmunity resource for FileMaker users and developers for 16 years. It receives no funding and has no advertisements. If it has helped you out, I'd really appreciate it if you could contribute whatever you think it's worth: