Jump to content
Salesforce and other SMB Solutions are coming soon. ×

No of days in a month?


blackcat
 Share

Recommended Posts

We can all look at a calender & see the no of days in a month, ist there an easy way of determining the no of days within a calculation?

 

I do NOT want to do a create of 32 records with auto enter dates, search for month name, set the no of found records then delete all the records once i have the number.

There must be an easier way! any suggestions?

 

Thanks

Steve

Link to comment
Share on other sites

Day( dateField - Day(dateField) )

 

... will give you the last day of the prior month. Set the calc as number.

 

Date ( Month ( dateField) ; 0 ; Year ( dateField) )

 

... will give you the last date of the prior month. Set this calc as date.

 

dateField - Day (dateField)

 

... set as date will also return the last date of the prior month.

 

I LIKE this subject! It woke me up quicker than coffee! smiley-laughing

 

UPDATE: Oh, and this one:

 

Date ( Month ( dateField ) + 1 ; 0 ; Year ( dateField ) )

 

... set as date will return the last date of the current month. Want more?

 

Day (Date ( Month ( date) + 1 ; 0 ; Year ( date) ) )

 

... set as number returns the last day of the current month. Okay, I'll stop. smiley-sealedsmiley-laughing

 

LaRetta

Link to comment
Share on other sites

Bag of tricks, as in had these written down somewhere? Heck no, Mike. I whipped these out before my eyes were even open. I've been studying date logic. I think dates (and calcs in general) ROCK!!smiley_cool

 

Oh, this stuff leaves me panting ... but yes ... most of what I learn comes from the very forums I prowl and devour daily. smiley-laughing

Link to comment
Share on other sites

Well, I don't know about "panting," but I've learned quite a bit myself. I suppose for me the fun stuff is seeing all the interesting relational models and various clever ways people find to use relationships to solve problems.

 

For the most part, date logic escapes me (that one above was in MY bag of tricks.) Heck, I can't even figure out my own age, much less figure out a valid age calc for FileMaker. Recursive calcs are no problem, but those date calcs twist my noodle into a pretzel. Oh Really!

 

Oh, BTW: Happy 500th! smiley_cool

Link to comment
Share on other sites

Mike, my graph would make a camel faint. Oh No! I've been asked if it bites (and no, I'm not kidding). vs. 6 was easier for me ... we have so many options in 7/8 that it feels like I'm playing 3D Chess and MY head spins.

 

Recursion easy? Well I've been having a ball (using global variables) and I can explode, write backwards, pattern-match colorize etc. But those recursive CFs can also get away. It's amazing how a system can shimmy and shake from one tiny (silly) error. Opps!

 

Steve, if I didn't cover what you needed, please let us know. You can replace dateField with Status(CurrentDate) and set the calc unstored so it will stay up-to-date for you. You haven't said what the date will be used for, but we can cover it nonetheless. smiley-laughing

 

LaRetta

Link to comment
Share on other sites

This thread is quite old. Please start a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share



×
×
  • Create New...

Important Information

Terms of Use