cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

SPC Chart

Former Member
0 Likes
228

Hi all,

I have two columns product_level and Date_ time. I mapped product_level column into value column and date_time column into attribute and xAxis label column.

Now my spc chart shows the date_time values in xAxis like 2007-10-3 T 15:25:17 . I want to remove “T” in the date_time value, please help me.

Note: my database have the value like 2007-10-3 15:25:17

thanks in adv

murali

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Likes

Murali

If u r using the XacuteQuery where the column Date_Time is used, then in the BLS use the built-in function <b>datefromxmlformat(<YourDateTime>,"yyyy-MM-dd HH:mm:ss" )</b> before assignment to the XML Output

Regards

Som

Former Member
0 Likes

Som,

i am not using BLS,

i used Display template, my database have only 2007-10-03 15:25:34, but the Xaxis of Spcchart should be 2007-10-03 T 15:25:34.

i dont know how come this "T" and why come this "T". please help me.

-murali

Former Member
0 Likes

Murali

If u use the Date column directly from Database in the Display Template, the X-Axis Label always takes the Date-Time Data Typed Column with TimeStamp (T) by default.

But one thing more to note - SPC Chart is not the best approach for showing only Product Level with Date time since SPC Chart is the chart for <b>Statistical Process Control</b> where Statistics Values are calculated internally in the SPC Chart with provided Measurement Values in each Data Point on the Chart.

So, u better can use the iChart type Display Template with Bar subtype where use Product Level in Value Columns and Date Column in label Columns. This will suit ur requirement to represent the Product Level with desired date time (no 'T') in the label column

Regards

Som

jcgood25
Active Contributor
0 Likes

Murali,

Just type cast your datetime column field into a string in your SQLQuery template. This way you can control the format of the date as a string and can control the attribute in the resultset. You shouldn't have to change anything in your SPCChart display template if you alias the column name accordingly. If you need the datetime field to be returned in the native format then just alias the column with a new name and map that into your display template.

Regards,

Jeremy

Former Member
0 Likes

thanks

abesh
Contributor
0 Likes

Murali,

Again, please award points for correct answers. (I've done it for you this time )

Regards

Abesh

Answers (0)