Jump to content
Server Maintenance This Week. ×

OS X Address Book Dates Simulation


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

Recommended Posts

open up Address Book and start editing someone's card. Select the Birthdate field and type "today" then hit Return.

Next try "tomorrow", "next week", "last month", "next Tuesday".

This code will replicate this functionality in FMP.

Create a date field that does a GetAsDate(TextField)

Create a field called "TextField" auto enter this calc, then uncheck the auto update.

Let([

field = textfield;

v_left = LeftWords(field;1);

v_right = RightWords(field;1);

words = WordCount ( field );

today = GetAsDate(Get(CurrentDate));

tomorrow = today+1;

yesterday = today -1;

thisday= DayOfWeek(today);

NextDayNum= Case(

v_right = "Sunday";1;

v_right = "monday";2;

v_right = "tuesday";3;

v_right = "wednesday";4;

v_right = "thursday";5;

v_right = "friday";6;

v_right = "saturday";7);

LastDayNum= Case(

v_right = "Sunday";7;

v_right = "monday";6;

v_right = "tuesday";5;

v_right = "wednesday";4;

v_right = "thursday";3;

v_right = "friday";2;

v_right = "saturday";1);

weekday = Case(NextDayNum ? 1 and NextDayNum ? 7;1);

nextmatrix = Choose(thisday; "";

"7

Date.fp7.zip

Link to comment
Share on other sites

  • 3 months later...
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.