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
http://www.dwdataconcepts.com

Share on Facebook Share on Twitter

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

  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!!!

 

Comments

Log in to post comments.

 

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

Under construction. Email me your wish list for improvements.