Date Format Issue

TeeChart for JavaScript for the HTML5 Canvas
Post Reply
aaron
Newbie
Newbie
Posts: 30
Joined: Mon Apr 17, 2023 12:00 am

Date Format Issue

Post by aaron » Wed Apr 26, 2023 5:44 am

I having date format issues
it should be 00:00:00 07-Apr-2023

Code: Select all

  
     this.TChart.axes.bottom.visible = true;
      this.TChart.axes.bottom.labels.dateFormat = "HH:mm:ss dd-MMM-yy";    
      this.TChart.axes.bottom.title.text = "\nDateTime";
      this.TChart.axes.bottom.grid.visible = true;  
      this.TChart.axes.bottom.automatic = true;
      
        for (var t = 0; t < _data.xData.length; t++) {         
        	
       	   // sample date from data  "2023-04-06T21:26:05.72-05:00"        
          const _date_ = new Date(_data.timeStampData[t]);      
          this._series0.data.x[t] = _date_ ;          
          
          }
      
      
  
Attachments
date.JPG
date.JPG (20.34 KiB) Viewed 24492 times

Marc
Site Admin
Site Admin
Posts: 1272
Joined: Thu Oct 16, 2003 4:00 am
Location: Girona
Contact:

Re: Date Format Issue

Post by Marc » Tue May 02, 2023 2:37 pm

Hello,

I've added an option in the combo here, custom3:

https://www.steema.com/files/public/tee ... tetime.htm

code:

Code: Select all

Chart1.axes.bottom.labels.dateFormat = "hh:mm:ss d-mmm-yy";
Regards,
Marc
Steema Support

aaron
Newbie
Newbie
Posts: 30
Joined: Mon Apr 17, 2023 12:00 am

Re: Date Format Issue

Post by aaron » Wed May 03, 2023 9:51 am

Thanks

Post Reply