ASE Home Page Products Download Purchase Support About ASE
ChartDirector Support
Forum HomeForum Home   SearchSearch

Message ListMessage List     Post MessagePost Message

  Working with Financial Charts
Posted by pankaj arya on Nov-05-2013 02:30
Hi
currently i have financial charts working with mySql database.
But due to load on shared hosting and few warnings from my service provider.

I am planning to connect data from MS SQL Server 2005
i have created the connection using mssql_connect

and i am seeing the output as given here http://www.niftylivecharts.com/end-of-day-chartsS4.php

Since the UNIX_TimeStamp doesn't works in MS SQL Server
how can i get my charts working ?

Moreover how i can see what data in returned rather than seeing

"Extra Point = 1 data point count = 1 ..........  " Message

Thanks for the Help

  Re: Working with Financial Charts
Posted by Peter Kwan on Nov-06-2013 01:13
Hi pankaj,

You can use chartTime or chartTime2 to create a date/time in ChartDirector. chartTime2 expects a UNIX timestamp as the input. chartTime expects the year, month, day, hour, minite and second as the input. If MS SQL cannot output UNIX timestamps, it should still be able to output the year, month, day, hour, minute and second parts of a date. So you can create an SQL that output these information, and pass them to chartTime.

For example, you can use the MS SQL "Convert" function to output a date as a text string in "yyyy-mm-dd hh:mi:ss" format. Then you can extract the date parts out and pass them to chartTime:

$myTimeStamps[] = chartTime(substr($timeString, 0, 4), substr($timeString, 5, 2), substr($timeString, 8, 2), substr($timeString, 11, 2), substr($timeString, 14, 2), substr($timeString, 17, 2));

For the output "Extra Point = 1 data point count = 1 ..........  ", I think ChartDirector will not create this output. I suspect it is created by your code. If you do not want to have this output, but to display the data, please modify your code to not to produce this output, but output the data instead.

Hope this can help.

Regards
Peter Kwan