Hi,
I've got stock market data in a structure as follows.
struct PriceInfo
{
double Open;
double High;
double Low;
double Close;
unsigned int Volume;
unsigned int Time;
std::string Date;
};
My program imports the data from a csv file and stores it in memory etc. The date and time look like this when printed to screen.
Date Time Open High Low Close Volume
12/10/2009 930 2100 2200 2075 2150 10000
12/10/2009 931 ....etc
12/10/2009 932 ....erc
I now need to be able to compare data using the date (string) and time (unsigned int) as 'sort by' fields. Essentially, I'd like to be able to do something like:
For 12/10/2009 930 to 12/10/2009 1600 do analysis
or For 12/10/2009 to 12/14/2009 do analysis
Should the date string and time int be combined to form one datetime object? If so, can someone show me the steps? I've googled but am too inexperienced to really understand the examples and need someone to walk me step by step.
Thanks,
TR