Date Format

TeeChart for ActiveX, COM and ASP
Post Reply
Ajith Nair
Newbie
Newbie
Posts: 49
Joined: Wed Aug 18, 2004 4:00 am

Date Format

Post by Ajith Nair » Mon Apr 03, 2006 9:40 am

Hi Narcís Calvet,

I changed my bottom axis to double format and I could change the lable text. But once it finish all the formating then it change back to old format which is in double.

Please see my code below,

If (Axis = atBottom) Then

If Len(LabelText) > 0 Then
dTotValue = CDbl(LabelText)
If (dTotValue) >= 1 Then '' days
LabelText = Format((dTotValue), "###0") & " Days"
ElseIf (dTotValue * 24) >= 1 Then '' Hours
LabelText = Format((dTotValue * 24), "#0") & " Hours"
ElseIf (dTotValue * 24 * 60) >= 1 Then '' Minutes
LabelText = Format((dTotValue * 24 * 60), "#0") & " Min."
ElseIf (dTotValue * 24 * 60 * 60) >= 1 Then '' Sec
LabelText = Format((dTotValue * 24 * 60 * 60), "#0") & " Sec."
Else
LabelText = " 0 Sec."
End If
End If
End if

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Mon Apr 03, 2006 9:44 am

Hi Ajith,

Could you please send us an example we can run "as-is" to reproduce the problem here?

You can post your files at news://www.steema.net/steema.public.attachments newsgroup.
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Ajith Nair
Newbie
Newbie
Posts: 49
Joined: Wed Aug 18, 2004 4:00 am

Date format

Post by Ajith Nair » Mon Apr 03, 2006 10:20 am

Hi Narcís,

Actually its a part of big project. I am afraid that I cant send the whole module. I can explain one by one,

1. I have measurement data which has Y-Axis with pH value and X-Axis date time.

2. In X-Axis I subtract start date & time with current date & time which I want to show Elapsed time in Miniuts and hours and days. After 24 hours I want to make 25 hours and later 1 day and so on.

As per your suggestion I changed X-Axis with double type and date and time is showing in double. And I am calculating date and time and put the lable as per user defined format. But once all the process is finished lable goes back to double number format.

Ajith Nair
Newbie
Newbie
Posts: 49
Joined: Wed Aug 18, 2004 4:00 am

Date formating

Post by Ajith Nair » Mon Apr 03, 2006 12:14 pm

Hi Narcís Calvet,


I sent the file towards you through "steema.public.attachments"

Thanks in advance,
Ajith

Ajith Nair
Newbie
Newbie
Posts: 49
Joined: Wed Aug 18, 2004 4:00 am

Post by Ajith Nair » Mon Apr 03, 2006 2:32 pm

Hi Narcís Calvet,

Atlast I manage to get proper label format. Problem occured when I was debugging, if not its working fine.

Thanks once again
Ajith

Post Reply