Here is an example of setting date format based on a parameter. look at
the beforeFactory script. It uses a style to do this operation. I also
commented out a script on the table row oncreate that shows how to do it
if you do not want to use a style.
On 6/10/2011 10:53 AM, Gopi wrote:
> Hi ,
>
> I need to display hours OR Hours:minutes formating based on true or
> false value
>
> for example :
> Timeformat ="hh:mm" then display regularhrs in hh:mm format.
> or Display regularhrs in h format.
>
> I created a timeformat parameter and can write if statment.
> How can I display REGULARHRS into hh:mm or h format.
>
> Please suggest.
Thank you for qucik reply."REGULARHRS " is declared as float.
Database stores it as HOURS:MINUTES .
I just have to separate hours from HOURS:MINUTES when user selects timeformat(parameter) =TRUE"
else
Regular hours should dispaly in hours:minutes (fixed ) format.
What does the value look like when retrieved. Can you give an example?
Jason
On 6/10/2011 1:23 PM, Gopi wrote:
> Hello Jason,
>
> Thank you for qucik reply."REGULARHRS " is declared as float.
> Database stores it as HOURS:MINUTES . I just have to separate hours from
> HOURS:MINUTES when user selects timeformat(parameter) =TRUE"
> else
> Regular hours should dispaly in hours:minutes (fixed ) format.
>
>
When you preview the dataset a float comes back with 4: in it?
Jason
On 6/10/2011 1:54 PM, Gopi wrote:
> RegularHrs: 4:13333(4 hours :1333 minutes)
> When Timeformat(parameter) ="True" then
> {
> Regularhrs = 4 }
> else
> {
> Regularhrs = 4.13 }
>
> Thank you for your help.Please let me know if this example is not clear.
>