Format Function issue

  • 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

  • It's converting a month "number" to a month "text". In other words:

    You type in '4' and you get back "April', 5 gets you "May", etc....

    In SQL Server - I'd actually build a simple table to do this kind of lookup.

    ----------------------------------------------------------------------------------
    Your lack of planning does not constitute an emergency on my part...unless you're my manager...or a director and above...or a really loud-spoken end-user..All right - what was my emergency again?

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

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