Renaming a field in msaccess query

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • eogyamfi
    New Member
    • Aug 2008
    • 3

    Renaming a field in msaccess query

    I have field called Datoutkd in my table, I need this field to rename date in the query. I used the replace function in order to create a new column with date as the field but could not work.
    Please your advice is needed to solve this problem
  • nico5038
    Recognized Expert Specialist
    • Nov 2006
    • 3080

    #2
    Your objective "I need this field to rename date in the query" isn't clear to me.
    When you need just the name "Date" (or safer "DateOutput ") in your qery result just use:
    [CODE=SQL]
    select Datoutkd as DateOutput from tblX
    [/CODE]
    When you want to change the datatype from text to date, then define an additional column with datatype Date and update that with the statement:
    [CODE=SQL]
    update tblX set DateOutput = Cdate(Datoutkd)
    [/CODE]

    Nic;o)

    Comment

    Working...