Date Format Code

Discussion in 'Microsoft Access Reports' started by rml, Jun 7, 2009.

  1. rml

    rml Guest

    How can I make the following code convert the date portion to dd/mm/yy
    instead of the standard mm/dd/yy?

    = Trim([CreateDate] & " / " & [Tech])

    Thanks.
     
    rml, Jun 7, 2009
    #1
    1. Advertisements

  2. rml wrote:

    >How can I make the following code convert the date portion to dd/mm/yy
    >instead of the standard mm/dd/yy?
    >
    >= Trim([CreateDate] & " / " & [Tech])



    This is different from your other formatting question.
    Here, you need to use the Format function:

    =Trim(Format(CreateDate, "ss/mm/yy") & " / " & [Tech])

    --
    Marsh
    MVP [MS Access]
     
    Marshall Barton, Jun 7, 2009
    #2
    1. Advertisements

  3. "Marshall Barton" <> wrote in message
    news:p...
    > rml wrote:
    >
    >>How can I make the following code convert the date portion to dd/mm/yy
    >>instead of the standard mm/dd/yy?
    >>
    >>= Trim([CreateDate] & " / " & [Tech])

    >
    >
    > This is different from your other formatting question.
    > Here, you need to use the Format function:
    >
    > =Trim(Format(CreateDate, "ss/mm/yy") & " / " & [Tech])


    Slight typo. It should be

    =Trim(Format(CreateDate, "dd/mm/yy") & " / " & [Tech])


    --
    Doug Steele, Microsoft Access MVP
    http://I.Am/DougSteele
    (no private e-mails, please)
     
    Douglas J. Steele, Jun 7, 2009
    #3
    1. Advertisements

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.

Share This Page