Results 1 to 3 of 3
  1. #1
    Join Date
    Feb 2009
    Posts
    51

    Unanswered: desired dates type

    Hi,

    first of all wishing you all a merry X'mas.

    I need to format a date field mmddccyy format.

    if month is 1 digit then it should be pre append zero e.g. '01'
    if date is one digit is the same e.g. '06'
    year is alright i got no problems as it is always 4 digtt.

    please help.

    thx
    .......
    She drank beer with Coke Cola
    and that's the way I like it...
    .......

  2. #2
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    Code:
    REPLACE(CONVERT(CHAR(10),mydate,101),'/','')
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL

  3. #3
    Join Date
    Feb 2009
    Posts
    51

    thx

    Thats great thanks )
    .......
    She drank beer with Coke Cola
    and that's the way I like it...
    .......

Posting Permissions

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