Results 1 to 7 of 7

Thread: custom format

  1. #1
    Join Date
    Jul 2004
    Posts
    214

    Unanswered: custom format

    I am creating a new table and I want to store the month as date/time but want it displayed in the table as the name of the month. Under format; there is no option for this. How do I create a custom format to display the name of the month in the table. I am told to use "mmmm" but where?
    Thanks

  2. #2
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    if you cannot finda pre existing format mask then type int he format mask you eant in place

    I'd try dd/mmm/yyyy
    I'd rather be riding on the Tiger 800 or the Norton

  3. #3
    Join Date
    Dec 2002
    Location
    Préverenges, Switzerland
    Posts
    3,740
    i don't apply formats to table fields. tables are for data. in any case i am the only person who gets to see my tables and i don't need them prettified.

    forms and reports are for users to see, to play with, and attempt to destroy ...and that's where all formatting belongs.

    izy
    currently using SS 2008R2

  4. #4
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    Id agree that it should be in the presentation layer, however if you do set the format in the table before you design the forms & reports then it will automatically be pulled through.

    it doesnt matter, but I'm in favour of doing that so if users want to design forms & reports they will get that predetermined option as a default.

    its horses for courses in my books. and it can always be set for a specific requirement eg a compressed data format for a report short on space.
    I'd rather be riding on the Tiger 800 or the Norton

  5. #5
    Join Date
    Dec 2004
    Location
    Madison, WI
    Posts
    3,926
    I'd put on the form for that field in the Format properties, "mmmm" (or in a query....MyDate: Format([MyDateField],"mmmm"). I rarely put formatting in the table themselves. I've had troubles with trying to format dates in certain ways in the table but healdem raises a good point.
    Expert Database Programming
    MSAccess since 1.0, SQL Server since 6.5, Visual Basic (5.0, 6.0)

  6. #6
    Join Date
    Aug 2006
    Posts
    559
    I know there's a way you can do this. I've seen it before. I don't remember how, but I'll look around and see if I can find it again.

  7. #7
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    set the format to:
    mmm yyyy

    but its generally better to make sure that your data is display in its entirety.. that way round it helps trying to get a feel for the data on that elusive bug hint at daft hours in the (early) morning, or when it's long gone beer o'clock and you still have to work.

    in an ideal world it should be in the presentation layer.. ie int he forms and reports as Izzy and oithers have all said.. but if you want to put it in t atable the format is the place to put it.

    like wise it helps in my view to set a caption.. that way round that value will also be pulled through into forms and reports.. again it helps, especially if you use psuedo cryptic column names,, the caption is a good place for a more reassuring description


    eg I might use
    orddeldate where as the user may know that column as the "Order Delivery Date"
    I'd rather be riding on the Tiger 800 or the Norton

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •