General discussion

  • Creator
    Topic
  • #2305743

    Date Formats In Access 2000

    Locked

    by cbremar ·

    I am trying to a make a date (04/03/03) – month, day, year – that is typed into a text box on an Access form be saved to the table in a different format (030304) – year, day, month.

    Is there anyone out there that can help me?

All Comments

  • Author
    Replies
    • #3358094

      wrong forum

      by john_wills ·

      In reply to Date Formats In Access 2000

      This question belongs in Technical Q & A. As it happens, I know the answer.

      • #3358055

        What’s the answer?

        by cbremar ·

        In reply to wrong forum

        So, what’s the answer?

    • #3357895

      Format(…)

      by jackofalltech ·

      In reply to Date Formats In Access 2000

      Assuming you want to store the date as a string…

      sNewDate = Format(DateValue(sOldDate), “yyddmm”)

      Ralph

    • #3532815

      Reply To: Date Formats In Access 2000

      by saqibmabbasi ·

      In reply to Date Formats In Access 2000

      Hello,

      Suppose that the data is saved in the database when you press a button. then what you can do is
      in the button click event use the format function as follows

      someString = format(yourDate, newFormat)
      here “yourDate” is the date that isentered.
      newFormat is the format you want to save the data in like “yyddMM”.

      and someString is just to assign the date into a variable then save. you can also save the date directly without assigning it to a variable.

      hope this helps.

Viewing 2 reply threads