+ Reply to Thread
Results 1 to 3 of 3

Date conversion to another form

  1. #1
    Registered User
    Join Date
    05-29-2008
    Posts
    2

    Date conversion to another form

    Hello,

    I currently use a free add-in written by Randy Harmelink to retrieve the price of a stock at a given date. In my spreadsheet, I have a large number of dates listed in date format (ie: 1/1/1998) in Column A, but the actual data for the dates is listed by Excel in the form (ie: 28491) if I change the formatting to general.

    For the add-in, I typically use the function:
    =RCHGetYahooHistory("GOOG",1998,1,1,etc...) which is in the form Year,Month,Day.

    What I would like to do is to be able to essentially do this:
    =RCHGetYahooHistory("GOOG",A1,etc...) or in other words, pass the date in Column A to the function in the correct format. But i'm not sure how to do this when Excel stores the date in the form '28491' in A1.

    How I might accomplish this?

  2. #2
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582
    The FUNCTION takes year, month and day as separate arguments so that you can't simply reference A1. It might work if you use this
    Please Login or Register  to view this content.
    A1 can be formatted any way you like (except as text).

    Does that work?

    ChemistB

  3. #3
    Registered User
    Join Date
    05-29-2008
    Posts
    2
    ChemistB,

    That works perfectly! Thank you!

+ 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