Update Query - search for "/"

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • artemetis
    New Member
    • Jul 2007
    • 76

    #1

    Update Query - search for "/"

    Simple, I'm sure...

    I'm trying to run an update query, where I am looking to update "/" with "-".

    I can't figure out how to set the criteria/update to fields correctly for these special characters.
  • TheSmileyCoder
    Recognized Expert Moderator Top Contributor
    • Dec 2009
    • 2322

    #2
    Replace(strInpu t,"/","-")

    Comment

    • artemetis
      New Member
      • Jul 2007
      • 76

      #3
      table: tblMain
      field: joinDate.

      Trying to change the "/" to "-".
      Dates are in 2010/04/01 format and I need them to be in 2010-04-01 format.
      I was using the qry builder in access and trying to use the "Update" qry.

      Comment

      • TheSmileyCoder
        Recognized Expert Moderator Top Contributor
        • Dec 2009
        • 2322

        #4
        Thats the way dates are stored. What you want is do DISPLAY them differently.
        Try:
        format([JoinDate],"yyyy-mm-dd")


        EDIT:
        If you set the format property in the table itself, it will carry over to all new reports/forms.

        Comment

        • artemetis
          New Member
          • Jul 2007
          • 76

          #5
          Yeah..I'm aware of that.
          The thing is, I'm exporting this table into a CSV that is being imported into a *proprietary* system. They require this date format. The field is text, so it's not a true date format on either db.

          Comment

          • artemetis
            New Member
            • Jul 2007
            • 76

            #6
            Thanks for your help!

            Comment

            Working...