Help on Format function

  • Hi,

    I am new to Access. I am rewriting all the access queries to SQL 90. I am not able to understand the part of the query which is,

    Format(CVDate([Enter a number for 1st month to compare] & "/1/96"),"mmmm")

    Where ([Enter a number for 1st month to compare] is a parameter for which the value can be from

    1-12. Can you please let me know what this actually does and please let me know the output.

    Thanks,

    ek

  • You have to work from the center outward.

    CVDate([Enter a number for 1st month to compare] & "/1/96")

    Means "convert this string to a date using the input value as the month, and using the first day of the month and make the year be 1996."

    Format( <<this new date value>>,"mmmm") means display the month spelled out, like "January".

    So, you type "1" and get January. You type "5" and get May.

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply