|
using System;
namespace SparkAPI.Market
{
/// <summary>
/// Static extension methods providing pre-formatted timestamp strings
/// </summary>
public static class MarketTime
{
/// <summary>
/// Returns time specified to three decimal places in format HH:mm:ss
/// </summary>
public static string ToMarketTime(this DateTime dateStamp)
{
return dateStamp.ToString("HH:mm:ss");
}
/// <summary>
/// Returns date and time specified to three decimal places in format dd-MM-yyyy HH:mm:ss
/// </summary>
public static string ToMarketDateTime(this DateTime dateStamp)
{
return dateStamp.ToString("dd-MM-yyyy HH:mm:ss");
}
}
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
Paul Francis currently works as a senior engineer at The Trade Desk.
He holds an undergraduate Honours degree in Finance, and is near completion of a Ph.D. in Market Microstructure, specialising in order flow modelling, and market data processing, reconstruction and analytics.
He is also the creator of Sharp Spark (Spark API SDK), an open source component designed to facilitate the processing of real-time market data from the Spark API:
http://sourceforge.net/projects/sparkapi
Paul lives in Sydney, Australia.