+ Reply to Thread
Results 1 to 5 of 5

pick up date, month and year from a date

Hybrid View

  1. #1
    Registered User
    Join Date
    10-02-2003
    Posts
    80

    pick up date, month and year from a date

    I have date in say column b.
    I need to have year, month and date from column b to
    column c, column d and column e so I can sort data
    by month or date.

    I know it is simple formulae but have forgotten it.

    Appreciate help.

    thanks much

    vikkam

  2. #2
    Valued Forum Contributor Excelenator's Avatar
    Join Date
    07-25-2006
    Location
    Wantagh, NY
    Posts
    333
    how is

    =MONTH(B1)
    =DAY(B1)
    =YEAR(B1)

    for simple?
    ---------------------------------------------------
    ONLY APPLIES TO VBA RESPONSES WHERE APPROPRIATE
    To insert code into the VBE (Visual Basic Editor)
    1. Copy the code.
    2. Open workbook to paste code into.
    3. Right click any worksheet tab, select View Code
    4. VBE (Visual Basic Editor) opens to that sheets object
    5. You may change to another sheets object or the This Workbook object by double clicking it in the Project window
    6. In the blank space below the word "General" paste the copied code.

  3. #3
    MarkN
    Guest

    RE: pick up date, month and year from a date

    Hi Vikkam,

    Have a look at http://www.cpearson.com/excel/datetime.htm
    --
    Hope this helps,
    MarkN


    "vikkam" wrote:

    >
    > I have date in say column b.
    > I need to have year, month and date from column b to
    > column c, column d and column e so I can sort data
    > by month or date.
    >
    > I know it is simple formulae but have forgotten it.
    >
    > Appreciate help.
    >
    > thanks much
    >
    > vikkam
    >
    >
    >
    > --
    > vikkam
    > ------------------------------------------------------------------------
    > vikkam's Profile: http://www.excelforum.com/member.php...fo&userid=1266
    > View this thread: http://www.excelforum.com/showthread...hreadid=565419
    >
    >


  4. #4
    Registered User
    Join Date
    10-02-2003
    Posts
    80
    Thanks much for your e-mail.

    Basically as explained I need 2nd column to oick up only
    date portion of the column1. 3rd column to pick up
    month portion of column 1. 4th column to pick up year.

    For example
    columnA columnB columnC columnD
    12/01/1952 01 12 1952

    With these I can sort the data as per column C and then Column B.
    I will get list with month and day in chronological order.

    I hope I have been able to explain my self.

    I tried formatting columnB as DD (=$A1) and Column C as MM (=$A1)
    but while sorting it picks up entire date and sorts by age.

    Thanks for your help.

    confused vikkam

  5. #5
    Registered User
    Join Date
    10-02-2003
    Posts
    80
    Excelenator

    Sorry did not see yourmail b4 my last reply.
    Thanks much. It solved one problem.
    However the cell has to be formated as text
    to display correct value. I am not sure if it will
    sort correctly.
    Will try tomorrow morning and see.

    Thanks once again cool dude.

    vikkam

    how is

    =MONTH(B1)
    =DAY(B1)
    =YEAR(B1)

    for simple?

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1