Hoosty Posted April 30, 2001 Posted April 30, 2001 Hi everyone, I am trying to create script that upon which day of the week will do a calculation. Once I have the code that will allow me to dtermine which day it is such as "Monday" "Teusday" I will be golden. It has to do this with out using a find function also, if you guys can help me out I woukld be in your favor. Thanks
dspires Posted April 30, 2001 Posted April 30, 2001 For the current day of the week, use: DayOfWeek(Status(CurrentDate))
Hoosty Posted April 30, 2001 Author Posted April 30, 2001 When I use that function it places a number in the field I have it set to. Is there a way to have a Left word statement with a loop going thorugh the days of the week, I am not sure about the syntax on this, I am very new to the scripting world of File Maker
elvis_impersonating_penguin Posted April 30, 2001 Posted April 30, 2001 a Case statement might work in for you... if i am reading the posts right, i am not exactly sure what you want.. but i will give it a try Case( DayOfWeek(Status(CurrentDate)) = 1 , "Sunday" , DayOfWeek(Status(CurrentDate)) = 2 , "Monday" , DayOfWeek(Status(CurrentDate)) = 3 , "Tuesday" , DayOfWeek(Status(CurrentDate)) = 4 , "Wednesday" , DayOfWeek(Status(CurrentDate)) = 5 , "Thursday" , DayOfWeek(Status(CurrentDate)) = 6 , "Friday" , DayOfWeek(Status(CurrentDate)) = 7 , "Saturday" ) that will give you the day of the week in the field in stead of the number.. i think... i am not positive..
dspires Posted April 30, 2001 Posted April 30, 2001 My bad, wrong function. Use: DayName(Status( CurrentDate))
Hoosty Posted April 30, 2001 Author Posted April 30, 2001 Ok that worked great the only thing is it is not a current date. The field in which I am trying to will be user defined, so it can't be Current date, it would have to go to the field the user sets the date in, see which day of the week that falls on then post the specified date in another field for the status scripting.
Hoosty Posted April 30, 2001 Author Posted April 30, 2001 excuse me, it needs to find which day of the week the user specified day is on and not date. My bad
Hoosty Posted April 30, 2001 Author Posted April 30, 2001 I got it, but thank you for the scripting lesson
Recommended Posts
This topic is 8612 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now