Skip to main content
Inspiring
October 11, 2006
Answered

Simple Date Question..

  • October 11, 2006
  • 3 replies
  • 516 views
I know this is pretty simple, but I just can't come up with a solution. I want to display the week of the month and I can't figure out how to. I've done it before, but I can't remember how, silly me!

I want it to output: This is the 2nd week of October or something to that effect.

Thanks
    This topic has been closed for replies.
    Correct answer CRidgway
    Combined -

    Edit 1: There was a code bug I am working on. Will repost once it is fixed.

    Edit 2: Found it... here is the working code.

    CR

    3 replies

    EnergyFedAuthor
    Inspiring
    October 11, 2006
    That worked fantastic. Thank you very much!
    Inspiring
    October 11, 2006
    You're welcome. Glad it helps.
    CRidgwayCorrect answer
    Inspiring
    October 11, 2006
    Combined -

    Edit 1: There was a code bug I am working on. Will repost once it is fixed.

    Edit 2: Found it... here is the working code.

    CR
    Inspiring
    October 11, 2006
    http://www.cflib.org/udf.cfm?ID=1122 and http://www.cflib.org/udf.cfm?ID=805 can do what you need. I'm sure they can be combined to output exactly what you want... but using them works this way:

    <cfoutput>It is the #IntegerRankFormat(weekInMonth())# week in #MonthAsString(Month(Now()))#.</cfoutput>

    It is the 2nd week in October.

    HTH,
    CR