I use this auto-enter calculation on a date field when I need this:
Self - Day ( self ) + 1
(In place of self, you can also use the name of the date field)
I also clear the do not replace existing values check box.
Then if I enter a date or select one from a calendar pop up, this calculation converts it to the first day of the same month.
Do you need to know the day name ?
I guess what I am asking... is it possible to define a field that finds the first day of any month, without having to specify any other date?
It need not be a day name, it needs to find: 01/01/XX, 02/01/XX, 03/01/XX and so forth.
From that field, I can establish what the day name is, and also create a date range (FirstDayofMonth + 1, +2, etc) of the fifteen days we discussed last week.
And because there is two pay periods in the month, I can also use that field to specify the Sixteenth thru the end of the month.
Of course, if I'm off-base on this (and usually I am) and there is a better idea to do this, I'm always open for suggestions.
What input do you plan to work with to get your first of the month date? The month number and year? or something else?
My method takes any date like 1/5/2010 and returns the first of the same month, 1/1/2010 -- which is easy to set up in a filemaker database.
Lust 4 Kicks wrote:
is it possible to define a field that finds the first day of any month, without having to specify any other date?
If by "find" you mean calculate, then =
Date ( YourMonth ; 1 ; YourYear )
will return the first day of given month in given year.
Mike, um, I mean Comment...
When I set up this calc, the results are unexpected
Maybe I defined the fields incorrectly, as I defined "your_month" and "your_year" as text fields,
In browse mode, enter "June" and "2010" and I get 12/1/2009.
Maybe the newspaper distribution solution I was talking about the other day is better left in Excel?
The results are (as always) expected - it's just that you didn't say the month was given as text. Fortunately, there's an easy fix for that:
Date ( Ceiling ( Position ( "janfebmaraprmayjunjulaugsepoctnovdec" ; Left ( your_month ; 3 ) ; 1 ; 1 ) / 3 ) ; 1 ; your_year )
P.S. I can sometimes be Michael, but never Mike.