Results 1 to 11 of 11
  1. #1
    Newbie
    Join Date
    January 18th, 2005
    Posts
    16
    Exclamation GenDate Formatting Help Needed
    Hi all.

    I am trying to get the GenDate output format to equal
    yyyy-mm-dd like 2005-02-21.

    How would I write the tag?

    [WM-GenDate yyyy-mm-dd]?

    If this is not possible now, I would love to recommend additional date formatting abilities for the next release.

  2. #2
    Affiliate Manager
    Join Date
    January 18th, 2005
    Location
    Los Angeles, California
    Posts
    1,913
    Quote Originally Posted by debraleitl
    Hi all.

    I am trying to get the GenDate output format to equal
    yyyy-mm-dd like 2005-02-21.

    How would I write the tag?

    [WM-GenDate yyyy-mm-dd]?

    If this is not possible now, I would love to recommend additional date formatting abilities for the next release.
    At the moment WebMerge can only generate the GenDate in the four formats described in the Help page for that tag. I can look into adding this one, but I'm using some highly-optimized libraries for generating the currently-supported formats, so I'd be concerned about a performance hit in attempting to add this one.

    If we can find others who need this format I'd be happy to explore it further.

    Another option might be to allow an option for WebMerge to use whatever format your system is currently set for. The calls to get the system-formatted date are very fast, so if you could set your system the way you want that output it would be simpler and more efficient for me to add, and would also support a nearly unlimited range of formats that way.
    Richard Gaskin
    Developer of WebMerge: Publish any data feed on any site
    http://www.fourthworld.com

  3. #3
    Newbie
    Join Date
    November 25th, 2006
    Posts
    9
    An aside... What would be very nice would be for Webmerge to be able to reformat text string dates. That would save converting dates to text strings in the database.

  4. #4
    Affiliate Manager
    Join Date
    January 18th, 2005
    Location
    Los Angeles, California
    Posts
    1,913
    What format do you have them in, and what format would you like?
    Richard Gaskin
    Developer of WebMerge: Publish any data feed on any site
    http://www.fourthworld.com

  5. #5
    Newbie
    Join Date
    November 25th, 2006
    Posts
    9
    I am assuming Richard's post is directed to Debra, if not I will start a new thread for my 'aside'

  6. #6
    Affiliate Manager
    Join Date
    January 18th, 2005
    Location
    Los Angeles, California
    Posts
    1,913
    Actually, it was for you. I can look into what it would take to support your request if you can tell me what format the dates are currently in and what format you'd like them to be in.
    Richard Gaskin
    Developer of WebMerge: Publish any data feed on any site
    http://www.fourthworld.com

  7. #7
    Newbie
    Join Date
    November 25th, 2006
    Posts
    9
    Formatting dates exprted as strings from Access
    Richard,

    When MS Access exports a date in a Microsoft Word Merge txt file it uses the short date format no matter what format was applied to the date field in Access, thus:

    "UnformattedDate"_____"LongDateFormat"____"ShortDateFormat"
    01/12/2006____________01/12/2006__________01/12/2006


    To achieve the desired date format in a page produced by WebMerge I have been creating queries in which date fields are converted to text strings, thus:
    Format([Date],"dd mmm yy") AS DateF gives 01 Dec 06.

    It would be nice if WebMerge could format the standard date string itself, ideally to the same standard and custom formatting regime used elsewhere (not just the basic formats available in WM-Gendate for example).

  8. #8
    Affiliate Manager
    Join Date
    January 18th, 2005
    Location
    Los Angeles, California
    Posts
    1,913
    There are a nearly infinite variety of possible date formats. I suspect you're really only interested in one or two. The one you've shown appears to be what WebMerge currently calls the abbreviated date format. Are there any others not currently supported that you could give me an example of? The more specific the info, the better chance I'll have of satisfying the request.
    Richard Gaskin
    Developer of WebMerge: Publish any data feed on any site
    http://www.fourthworld.com

  9. #9
    Newbie
    Join Date
    November 25th, 2006
    Posts
    9
    Just to check: I'm suggesting date formatting for WM-Field where it encounters date strings.

    So:

    [WM-Field: fieldname date(inputdateformat,outputdateformat)]

    where inputdateformat is the date format of the database feed, and outputedateformat is the desired format in the webpage.

    (Or maybe a whole new WM-tag devoted to date reformatting, but this might be less desirable.)

    The format I'd like now is the dd mmm yy in my example, but i can foresee instances when i might need the other common date formats (unfortunately my crystal balls are too cloudy to foresee which they might be).
    Last edited by htchmn; December 3rd, 2006 at 06:29 AM.

  10. #10
    Affiliate Manager
    Join Date
    January 18th, 2005
    Location
    Los Angeles, California
    Posts
    1,913
    One efficient method I could use would apply the format currently used by your system. This would allow nearly infinite flexibility with no performance impairment. It would, however, mean that the format you want is the same as what you prefer on your computer. Is that the case with your DD MMM YY?
    Richard Gaskin
    Developer of WebMerge: Publish any data feed on any site
    http://www.fourthworld.com

  11. #11
    Newbie
    Join Date
    November 25th, 2006
    Posts
    9
    That's a clever idea, but we would need at least two date formats and neither happens to be the same as the system format of my PC just at the moment. I could change the system format, but it would be easier to reformat the date into the desired text string in Access! It seems likely that the wider user community would also find reliance on the system date format an unattractive solution?

  12. Newsletter Signup

+ Reply to Thread

Similar Threads

  1. Formatting question
    By wyvern in forum WebMerge (Fourthworld.com)
    Replies: 8
    Last Post: September 16th, 2009, 07:04 PM
  2. gocollect - formatting <!--mfglist-->
    By richardeward in forum Cusimano.com Scripts
    Replies: 1
    Last Post: May 6th, 2005, 01:20 PM
  3. Blended results formatting
    By djblade311 in forum Cusimano.com Scripts
    Replies: 1
    Last Post: May 24th, 2003, 09:57 PM
  4. Email Formatting in PHP?
    By TJ in forum Programming / Datafeeds / Tools
    Replies: 2
    Last Post: February 19th, 2003, 09:20 PM

Posting Permissions

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