Results 1 to 5 of 5
  1. #1
    Join Date
    May 2002
    Posts
    28

    Unanswered: Is this possible?

    I have one field in a table which contains the date in the following format:

    mm/dd/yy

    The table I need to append this data to, however, structures the date data differently. There are 3 separate fields:

    year, month, day

    Is there anyways I can import the mm/dd/yy field into the year, month, day fields? iF so, how can I do this?

    Thanks

  2. #2
    Join Date
    Aug 2002
    Location
    Québec, Canada
    Posts
    109
    You can use Date function

    Year(Date)
    Day(Date)
    Month(Date)

    You can use that in SQL or in a Access module

    JefB - hope it helps

  3. #3
    Join Date
    Aug 2002
    Location
    Arkansas
    Posts
    13
    You can use the DatePart functiont to do this.

    for example:
    if orderdate = #06/15/02#
    DatePart("m",[OrderDate]) would return 6

    DatePart("yyyy",[OrderDate]) would return year (the actual format is base on the regional date setting in the control panel. 2002 in my case.


    Look in help for datepart functionfor more info

    Tag

  4. #4
    Join Date
    May 2002
    Posts
    28
    Thanks alot for your help

    I would like to covert the year for ALL the "day/month/year" records in my field.

    When I create a query using the expression - DatePart("yyyy",[OrderDate]) - it gives all my records with the same year (ie: 1990)

    How can I make it so i get the following results:

    1/2/99 1999
    1/4/89 1989

    so that every record it given the new year format that matches its original field.

  5. #5
    Join Date
    May 2002
    Posts
    28

    Smile Thanks guys

    my silly mistake, ignore last posting

    it worked perfectly

    thanks again

Posting Permissions

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