PC SOFT

FORUMS PROFESSIONNELS
WINDEVWEBDEV et WINDEV Mobile

Accueil → WINDEV 2024 → store and display hh:mm:ss
store and display hh:mm:ss
Débuté par Jeroen Rigterink, 09 mar. 2004 23:22 - 6 réponses
Posté le 09 mars 2004 - 23:22
Hello,
I am trying to store and display a time in format hh:mm:ss.
The only thing I can find in the Analysis is a time format with hh:mm.
When creating the control I can define a input mask and returned value where it is possible to choose hh:mm:ss but it doesn't store it in the file.
Can anyone explain me how to do this?
Regards,
jeroen
Posté le 10 mars 2004 - 00:02
Hi Jeroen
In your Analysis open the file that Contains
Your Date field.
Highlight the date field, select the "Rad" tab
On the bottom of the form.
Click on the Right Button after "Edit Control"
>From there you can set your Input mask, but most
Important your return Value, Select "HHMMSS"
HTH
Keep well
Peter Purton
Hello,
I am trying to store and display a time in format hh:mm:ss.
The only thing I can find in the Analysis is a time format with hh:mm.
When creating the control I can define a input mask and returned value where it is possible to choose hh:mm:ss but it doesn't store it in the file.
Can anyone explain me how to do this?
Regards,
jeroen
Posté le 12 mars 2004 - 12:02
Hello Jeroen,
In the analysis you should use a string of 6 characters for the time.
Regards,
Stefan
Hello,
I am trying to store and display a time in format hh:mm:ss.
The only thing I can find in the Analysis is a time format with hh:mm.
When creating the control I can define a input mask and returned value where it is possible to choose hh:mm:ss but it doesn't store it in the file.
Can anyone explain me how to do this?
Regards,
jeroen
Posté le 12 mars 2004 - 23:55
Stefan,
thank you for your reply. I've tried and it looks okay! One problem.
I would like to sum the times. I tried a loop through a table with:
UpdateCD.TotaalTijdsduur = (TimeToString(UpdateCD.TotaalTijdsduur)) + (TimeToString(Table_Track.Tijdsduur)
but it doesn't work. Do you have any idea?
jeroen

Hello Jeroen,
In the analysis you should use a string of 6 characters for the time.
Regards,
Stefan
Hello,
I am trying to store and display a time in format hh:mm:ss.
The only thing I can find in the Analysis is a time format with hh:mm.
When creating the control I can define a input mask and returned value where it is possible to choose hh:mm:ss but it doesn't store it in the file.
Can anyone explain me how to do this?
Regards,
jeroen
Posté le 13 mars 2004 - 09:46
Hello Jeroen,
what happend, if you make first the sum and after timetostring() ?
New_value = timetostring(time1 + time2)
Christoph
Stefan,
thank you for your reply. I've tried and it looks okay! One problem.
I would like to sum the times. I tried a loop through a table with:
UpdateCD.TotaalTijdsduur = (TimeToString(UpdateCD.TotaalTijdsduur)) + (TimeToString(Table_Track.Tijdsduur)
but it doesn't work. Do you have any idea?
jeroen

Hello Jeroen,
In the analysis you should use a string of 6 characters for the time.
Regards,
Stefan
Hello,
I am trying to store and display a time in format hh:mm:ss.
The only thing I can find in the Analysis is a time format with hh:mm.
When creating the control I can define a input mask and returned value where it is possible to choose hh:mm:ss but it doesn't store it in the file.
Can anyone explain me how to do this?
Regards,
jeroen
Posté le 14 mars 2004 - 14:06
Hi Cristoph,
I've tried your solution but doesn't work.
I don't understand sum of time at all.
I tried the following:
test1 is Time
test2 is Time
test3 is Time
TableSelectPlus("Table_Track",1)
test1 = TimeToString(Table_Track.Tijdsduur)
Info(test1)
TableSelectPlus("Table_Track",2)
test2 = TimeToString(Table_Track.Tijdsduur)
Info(test2)
test3 = test1 + test2
Info(test3)

by the way: Table_Track.Tijdsduur = String(6)
The Info's of test1 and test2 are correct. But test3 only displays test1, not the sum of test1 and test2.
Hello Jeroen,
what happend, if you make first the sum and after timetostring() ?
New_value = timetostring(time1 + time2)
Christoph
Stefan,
thank you for your reply. I've tried and it looks okay! One problem.
I would like to sum the times. I tried a loop through a table with:
UpdateCD.TotaalTijdsduur = (TimeToString(UpdateCD.TotaalTijdsduur)) + (TimeToString(Table_Track.Tijdsduur)
but it doesn't work. Do you have any idea?
jeroen

Hello Jeroen,
In the analysis you should use a string of 6 characters for the time.
Regards,
Stefan
Hello,
I am trying to store and display a time in format hh:mm:ss.
The only thing I can find in the Analysis is a time format with hh:mm.
When creating the control I can define a input mask and returned value where it is possible to choose hh:mm:ss but it doesn't store it in the file.
Can anyone explain me how to do this?
Regards,
jeroen
Posté le 14 mars 2004 - 16:12
Hello,
I did the following and it works:
PROCEDURE CalculateTotaalTijdsduur()
AantalTracks is int
i is int
TijdInteger is int
AantalTracks = TableCount(Table_Track)
Cd.TotaalTijdsduur = 0
i = 1
LOOP
IF i > AantalTracks THEN BREAK
TableSelectPlus("Table_Track",i)
TijdInteger = TimeToInteger(Cd.TotaalTijdsduur) + TimeToInteger(Table_Track.Tijdsduur)
Cd.TotaalTijdsduur = IntegerToTime(TijdInteger)
i = i + 1
END

Hi Cristoph,
I've tried your solution but doesn't work.
I don't understand sum of time at all.
I tried the following:
test1 is Time
test2 is Time
test3 is Time
TableSelectPlus("Table_Track",1)
test1 = TimeToString(Table_Track.Tijdsduur)
Info(test1)
TableSelectPlus("Table_Track",2)
test2 = TimeToString(Table_Track.Tijdsduur)
Info(test2)
test3 = test1 + test2
Info(test3)

by the way: Table_Track.Tijdsduur = String(6)
The Info's of test1 and test2 are correct. But test3 only displays test1, not the sum of test1 and test2.
Hello Jeroen,
what happend, if you make first the sum and after timetostring() ?
New_value = timetostring(time1 + time2)
Christoph
Stefan,
thank you for your reply. I've tried and it looks okay! One problem.
I would like to sum the times. I tried a loop through a table with:
UpdateCD.TotaalTijdsduur = (TimeToString(UpdateCD.TotaalTijdsduur)) + (TimeToString(Table_Track.Tijdsduur)
but it doesn't work. Do you have any idea?
jeroen

Hello Jeroen,
In the analysis you should use a string of 6 characters for the time.
Regards,
Stefan
Hello,
I am trying to store and display a time in format hh:mm:ss.
The only thing I can find in the Analysis is a time format with hh:mm.
When creating the control I can define a input mask and returned value where it is possible to choose hh:mm:ss but it doesn't store it in the file.
Can anyone explain me how to do this?
Regards,
jeroen