+ Reply to Thread
Results 1 to 4 of 4

Extracting Dates

  1. #1
    Registered User
    Join Date
    05-26-2006
    Posts
    4

    Extracting Dates

    I have dates formatted as 12-Jan-1967 (in A1) and 11-Jan-1967(in B1). How do I tell Excel to take the date 12-Jan-1967 in C1 since I want only the dates from/after the 12th day of the month? Since the dates are stored as numbers is there a way to check for the first two digits and if the first two digits are less than 12 then to reject that date? Basically all I want to do is extract dates from the 12th and reject the ones before the 12th of any month. Thank you!

  2. #2
    Gary''s Student
    Guest

    RE: Extracting Dates

    If a date is in A1 then:

    =IF(DAY(A1)<13,"bad","good")
    --
    Gary's Student


    "nandin11" wrote:

    >
    > I have dates formatted as 12-Jan-1967 (in A1) and 11-Jan-1967(in B1).
    > How do I tell Excel to take the date 12-Jan-1967 in C1 since I want
    > only the dates from/after the 12th day of the month? Since the dates
    > are stored as numbers is there a way to check for the first two digits
    > and if the first two digits are less than 12 then to reject that date?
    > Basically all I want to do is extract dates from the 12th and reject
    > the ones before the 12th of any month. Thank you!
    >
    >
    > --
    > nandin11
    > ------------------------------------------------------------------------
    > nandin11's Profile: http://www.excelforum.com/member.php...o&userid=34840
    > View this thread: http://www.excelforum.com/showthread...hreadid=545875
    >
    >


  3. #3
    Registered User
    Join Date
    05-26-2006
    Posts
    4

    Extracting Dates

    Hi,

    Thank you for your reply. Something does not seem to be working and I am sure it's an oversight on my part. I have 11-Jan-67 in E2 and 14-Jan-67 in G2 and in H2 =IF(DAY(E2<12),G2,E2) and yet it still returns the value of 11-Jan-67. Is there some special formatting I should follow?

    Thank you.

  4. #4
    Gary''s Student
    Guest

    Re: Extracting Dates

    We are almost there:
    =IF(DAY(E)<12,G2,E2)
    not
    =IF(DAY(E2<12),G2,E2)

    --
    Gary's Student


    "nandin11" wrote:

    >
    > Hi,
    >
    > Thank you for your reply. Something does not seem to be working and I
    > am sure it's an oversight on my part. I have 11-Jan-67 in E2 and
    > 14-Jan-67 in G2 and in H2 =IF(DAY(E2<12),G2,E2) and yet it still
    > returns the value of 11-Jan-67. Is there some special formatting I
    > should follow?
    >
    > Thank you.
    >
    >
    > --
    > nandin11
    > ------------------------------------------------------------------------
    > nandin11's Profile: http://www.excelforum.com/member.php...o&userid=34840
    > View this thread: http://www.excelforum.com/showthread...hreadid=545875
    >
    >


+ 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