Home › forums › Using CanvasJS › How to print just the date when importing dateTime from PHP › Reply To: How to print just the date when importing dateTime from PHP
In the code snippet that you have shared, the date-time values being read from database are assigned as labels instead of assigning it as x values. Hence, setting the valueFormatString won’t work in this case. Instead, you can go with one of the following options:
1) Format the date before assigning it to the label, or
2) Pass it as date-time and assign it to x value. And format it using valueFormatString.