Results 1 to 3 of 3
  1. #1
    Star Lounger
    Join Date
    Jul 2006
    Posts
    96
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Updating dates (2000)

    Hi folks, can anyone help with this - probably easy if you know how!

    I have a table with date periods expressed textually as 0180 (January 1980) 0280, etc. I am working in query view and want to write a conditional statement which says, if the last two characters in the field are between 80 and 99, insert "19", otherwise insert "20". Can anybody help me with this -am having no luck so far!

    Many thanks.

    Ina

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Updating dates (2000)

    Try

    Left([FieldName],2) & IIf(Right([FieldName],2)<"80","20","19") & Right([FieldName],2)

    where FieldName is the name of the text field.

  3. #3
    Star Lounger
    Join Date
    Jul 2006
    Posts
    96
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Updating dates (2000)

    Thanks again hans!

Posting Permissions

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