Easily Fetch the Last Trade Date and Time with QM_DateTime

The QM_DateTime function in MarketXLS lets you see the most recent trade date and time for a given stock symbol directly in Excel. This is incredibly helpful for monitoring current market data points and informing your trading decisions without leaving your spreadsheet. Whether you are building real-time dashboards or tracking end-of-day snapshots, QM_DateTime helps ensure you have up-to-date information.

Why Use This Function?

  • • Accurate Last Trade Data: Instantly retrieve the last reported trade date and time for US-listed stocks.
  • • Simplified Workflow: No need to switch between multiple financial websites. Everything is available in your Excel workbook.
  • • Seamless Integration: Pairs well with other MarketXLS functions (e.g., combining with other data fetches) to create custom dashboards.
  • • Time-Saving Automation: Update cells in bulk for numerous symbols with just one function call each.
  • • On-Demand Refresh: Request fresh data when you need it, ensuring you’re always working with current numbers.

How to Use in Excel

Simply enter the function into any cell in your spreadsheet as shown below:

=QM_DateTime("AAPL")

Replace "AAPL" with the ticker symbol you want to evaluate. When you enter a valid stock symbol, QM_DateTime attempts to retrieve and display the last known trade date and time from your MarketXLS data connection.

Parameters Explained

Parameter Description Example Values Notes
symbol The stock's or security’s ticker symbol whose last trade datetime you wish to retrieve "AAPL", "MSFT", "GOOGL" Must be a valid and recognized symbol. If invalid, the function may return "NA" or a prompt such as "Please Refresh".

Only one parameter is required: the "symbol." Ensure your MarketXLS subscription is active and properly configured to retrieve data.

Example Usage

Basic Examples

  1. Return Last Trade DateTime for Apple (AAPL):
    In cell A1, type: =QM_DateTime("AAPL")
    Excel will display the last trade date and time for Apple’s stock.

  2. Using a Cell Reference:
    • In cell B1, type "MSFT".
    • In cell B2, type: =QM_DateTime(B1)
    Excel will look at the ticker symbol in B1 (MSFT) and return the last trade date/time.

Advanced Scenarios

  1. Bulk Lookup for Multiple Symbols:
    • List multiple symbols (e.g., AAPL, MSFT, GOOGL) in column A.
    • In column B, use =QM_DateTime(A2), =QM_DateTime(A3), etc.
    • This approach quickly updates multiple stock entries at once.

  2. Integration with Other MarketXLS Functions:
    • Combine QM_DateTime with pricing or fundamentals data from other MarketXLS functions to build a comprehensive watchlist.
    • Example: Next to each last trade date/time, add a function like =QM_LastPrice(A2) to compare the time of the last trade with the latest price.

  3. Conditional Analysis:
    • Use QM_DateTime in nested IF statements to highlight or flag stocks with stale timestamps.
    • For instance, if the date/time is older than your threshold, you can prompt yourself to refresh or investigate further.

Common Questions and Troubleshooting

• Why Do I See "NA"?

  • This usually indicates the symbol is invalid or the data might not be cached. Double-check the ticker and ensure you have a valid subscription.

• Why Do I See "Please Refresh"?

  • This message appears when data is not yet retrieved or the service needs a refresh. Use MarketXLS’s refresh options to update your data.

• Why Is the Function Returning "Refreshing"?

  • The system is actively fetching new data. Wait until the process completes and check back.

• Can I Use Non-US Symbols?

  • While QM_DateTime primarily checks US-listed stocks, some international tickers may be supported depending on your MarketXLS data subscription. Verify coverage before using them.

• How Often Is Data Updated?

  • The exact update frequency depends on your MarketXLS plan and the availability of data from QuoteMedia. Check with MarketXLS for plan details.

By using the QM_DateTime function strategically, you can keep your Excel models current and better equipped for real-time or end-of-day decision-making. Combine it with other MarketXLS functions for a cohesive, data-driven workflow in Excel.

Get Access to 1 Billion Usable Market data points IN YOUR EXCEL SHEETS WITH EASY TO USE EXCEL FUNCTIONS

Get started today
MarketXLS Excel Add-in Tutorial - How to Use Datetime (On Demand) and Other Financial Formulas
How does MarketXLS work?