ESBPCS for VCL
Minutes2HHMM
Thread Starter: Pentti Pohjonen Started: 3/26/2008 4:11 PM UTC
Replies: 3
Minutes2HHMM
Hi,

I need to display minutes as HH:MM

I tried to use Minutes2HHMM function but it shows negative
values wrong, for example -26 mins displays as 0:-2
not -0:26

Also looking at source it seems that comments are not right:

function Minutes2HHMM (const Minutes: Double; const Separator: Char = ':'): string;
{: Returns a string in the format HH:MM:SS. The separator can be customised.
@param Seconds. The time period to be converted.
@returns the string.
@cat DTConv
}

Shouldn't param be minutes  and it does not return seconds ?

function Seconds2HHMMSS (const Seconds: Double; const Separator: Char = ':'): string;
{: Returns the Hour from a given date/time.
@param DT Date/Time to Convert.
@returns the Hour component.
@cat DTConv
}

Param should be seconds ?


Problem with CHM help.

I can't see contents of esbpcs.chm anymore, not sure but it might be bc
MS update

http://support.microsoft.com/kb/896358

jpm.chm is working

I have tried suggested workarounds but none works for me.

Ideas ?

TIA

Pentti Pohjonen
RE: Minutes2HHMM
Curious - I shall investigate and get back to you shortly as we would like
it to handle negatives properly :)

As for the comments, the current setup is that the comment occurs above the
function/procedure heading - but I will check the ones you mention...


Glenn Crouch, mailto:glenn@esbconsult.com
ESB Consultancy, http://www.esbconsult.com
Home of ESBPCS, ESB Calculators, ESBStats and ESBPDF Analysis
Kalgoorlie-Boulder, Western Australia  




-----Original Message-----
From: Pentti Pohjonen [mailto:penttipohjonen@hotmail.com]
Sent: Thursday, 27 March 2008 1:12 am
To: ESBPCS mailing list
Subject: [esbpcs] Minutes2HHMM
Hi,
I need to display minutes as HH:MM
I tried to use Minutes2HHMM function but it shows negative
values wrong, for example -26 mins displays as 0:-2
not -0:26
Also looking at source it seems that comments are not right:
function Minutes2HHMM (const Minutes: Double; const Separator: Char =
':'):
string;
{: Returns a string in the format HH:MM:SS. The separator can be
customised.
@param Seconds. The time period to be converted.
@returns the string.
@cat DTConv
}
Shouldn't param be minutes  and it does not return seconds ?
function Seconds2HHMMSS (const Seconds: Double; const Separator: Char =
':'): string;
{: Returns the Hour from a given date/time.
@param DT Date/Time to Convert.
@returns the Hour component.
@cat DTConv
}
Param should be seconds ?

Problem with CHM help.
I can't see contents of esbpcs.chm anymore, not sure but it might be bc
MS update
http://support.microsoft.com/kb/896358
jpm.chm is working
I have tried suggested workarounds but none works for me.
Ideas ?
TIA
Pentti Pohjonen
Re: Minutes2HHMM
Hi,

Yes, You are right about comments, my mistake.

Pentti

"Glenn Crouch" <support@esbconsult.com> kirjoitti viestiss�:016301c88fab$4aceb720$e06c2560$@com...
Curious - I shall investigate and get back to you shortly as we would like
it to handle negatives properly :)

As for the comments, the current setup is that the comment occurs above the
function/procedure heading - but I will check the ones you mention...


Glenn Crouch, mailto:glenn@esbconsult.com
ESB Consultancy, http://www.esbconsult.com
Home of ESBPCS, ESB Calculators, ESBStats and ESBPDF Analysis
Kalgoorlie-Boulder, Western Australia




> -----Original Message-----
> From: Pentti Pohjonen [mailto:penttipohjonen@hotmail.com]
> Sent: Thursday, 27 March 2008 1:12 am
> To: ESBPCS mailing list
> Subject: [esbpcs] Minutes2HHMM
>
> Hi,
>
> I need to display minutes as HH:MM
>
> I tried to use Minutes2HHMM function but it shows negative
> values wrong, for example -26 mins displays as 0:-2
> not -0:26
>
> Also looking at source it seems that comments are not right:
>
> >function Minutes2HHMM (const Minutes: Double; const Separator: Char =
> ':'):
> >string;
> >{: Returns a string in the format HH:MM:SS. The separator can be
> >customised.
> > @param Seconds. The time period to be converted.
> > @returns the string.
> > @cat DTConv
> >}
>
> Shouldn't param be minutes  and it does not return seconds ?
>
> function Seconds2HHMMSS (const Seconds: Double; const Separator: Char =
> ':'): string;
> {: Returns the Hour from a given date/time.
>  @param DT Date/Time to Convert.
>  @returns the Hour component.
>  @cat DTConv
> }
>
> Param should be seconds ?
>
>
> Problem with CHM help.
>
> I can't see contents of esbpcs.chm anymore, not sure but it might be bc
> MS update
>
> http://support.microsoft.com/kb/896358
>
> jpm.chm is working
>
> I have tried suggested workarounds but none works for me.
>
> Ideas ?
>
> TIA
>
> Pentti Pohjonen
>
>

RE: Minutes2HHMM
Pentti,

If you can email me direct at support@esbconsult.com then I'll send you and
update to ESBPCSDates that includes

Minutes2HHMM (-26) returns '-00:26'

I've also made sure Seconds2HHMMSS handles negative values now :)


Glenn Crouch, mailto:glenn@esbconsult.com
ESB Consultancy, http://www.esbconsult.com
Home of ESBPCS, ESB Calculators, ESBStats and ESBPDF Analysis
Kalgoorlie-Boulder, Western Australia