Question on Date format

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • binui
    New Member
    • Feb 2010
    • 7

    Question on Date format

    Hi,
    I have a field month (datatype number) in my table and I want to display the month in words. I wrote:

    select Format(Month,"m mmm") as month from mytable;

    But it gives Dec for 1, Jan for 2 and so on.Please advice me on this. Thank you
  • missinglinq
    Recognized Expert Specialist
    • Nov 2006
    • 3533

    #2
    This type of formatting has to be done against a Date, and you're trying to do it not by supplying a Date, but only a single Number!

    So to format it you need to make it into a Date This will do it in VBA code and I suspect it'll serve your purpose:.

    Format(Month & "/2/2010", "mmmm")

    Note that the day and year really don't matter here and were chosen at random.

    Welcome to Bytes!

    Linq ;0)>.

    Comment

    • binui
      New Member
      • Feb 2010
      • 7

      #3
      Thank you so much. This served my purpose.

      Comment

      Working...