Results 1 to 19 of 19

How to convert Date to string? And Pull data from multiple webpages

Threaded View

  1. #1
    Forum Contributor VAer's Avatar
    Join Date
    09-10-2016
    Location
    USA
    MS-Off Ver
    Office 365
    Posts
    803

    How to convert Date to string? And Pull data from multiple webpages

    This is a different question (following the earlier thread: https://www.excelforum.com/excel-pro...r-message.html ). Hopefully, this is the last question related to this project, and it should be the last question.

    I have date format 1/24/2022 in ShtEarningCalendar.Cells(2, 9) , yes the date appears as 1/24/2022

    Now I want to have Hyperlink string as below:
    Hyperlink = """https://finance.yahoo.com/calendar/earnings?day=2022-01-24"""

    But I cannot write above code directly, I need to get date from cell ShtEarningCalendar.Cells(2, 9)

    Question: How can I rewrite the code for Hyperlink? It should be something like this --- Hyperlink = """https://finance.yahoo.com/calendar/earnings?day="" & ShtEarningCalendar.Cells(2, 9).Value This is just the idea, the cell value needs to be converted to yyyy-mm-dd.

    Thanks.

    Edit: I tried Hyperlink = """https://finance.yahoo.com/calendar/earnings?day=" & Format(ShtEarningCalendar.Cells(2, 9).Value, "yyyy-mm-dd") & "" , but it does not work.

    Edit 2: I made a simple sample file (rather than uploading whole-project file), now I need to incorporate ActiveSheet.Cells(2, 9).Value into the code.
    Attached Files Attached Files
    Last edited by VAer; 01-22-2022 at 05:33 PM.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Extracting a date from a text string and then need to convert to a date format.
    By ldborders in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 09-03-2021, 03:53 PM
  2. Need function to convert date/time string to a date
    By marcus8 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 08-27-2019, 03:19 PM
  3. [SOLVED] Convert a Text String Date to Date Serial Number
    By herve73 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 11-10-2015, 10:53 AM
  4. [SOLVED] Convert Date into String
    By rizmomin in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 09-12-2014, 08:14 AM
  5. Convert string to Date?
    By Gabor in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-30-2013, 08:20 AM
  6. Convert Date to STring
    By tonymaguire in forum Excel General
    Replies: 9
    Last Post: 02-15-2006, 07:35 AM
  7. How to convert string to a date
    By galsaba in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 03-04-2005, 02:06 PM

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