Showing posts with label everybody. Show all posts
Showing posts with label everybody. Show all posts

Friday, March 9, 2012

Formating Date Attibute in AS 2005

Hello everybody,

i'm trying to format a date attribute in AS 2005. I try to use the format property in the dimension designer but it does not work. It will be very hard for me to create another field of date in the data source view. My Cube have have about 100 field of type DATE.

Could you help?

Try searcing this forum for "format string". See if any get any useful information from previous discussions. You will find quite a few on the matter.

Edward.
--
This posting is provided "AS IS" with no warranties, and confers no rights.

Sunday, February 19, 2012

Format a string to time

Hi everybody,
I have a string like this : "290302" and I'd like to convert into
the format : "29:03:02" but I can't.
I tried this :
= Format(ds.FieldOra, "T") but it couldn't get the new format.
It displays always the same "290302".
Also I tried with = Format(ds.Field1, "hh:mm:ss")
but all remains the same.
Could you help me ?
Thanks in advance!
DomenicoDomenico,
You can't do that because dates aren't stored as strings internaly. They
are numbers.
You could use the regular string manipualtion functions to get the result
you want.
=Left(ds.Field1,2) & ":" & Mid(dsField1, 3,2) & ":" & Right(ds.Field1, 2)
should just about do it for you.
Regards,
Rob Labbé, MCP, MCAD, MCSD, MCT
Lead Architect/Trainer
Fidelis
Blog: http://spaces.msn.com/members/roblabbe
"Riddick" <Riddick@.discussions.microsoft.com> wrote in message
news:CF69816F-BEEA-497F-80B0-FE59BA0A1688@.microsoft.com...
> Hi everybody,
> I have a string like this : "290302" and I'd like to convert into
> the format : "29:03:02" but I can't.
> I tried this :
> = Format(ds.FieldOra, "T") but it couldn't get the new format.
> It displays always the same "290302".
> Also I tried with = Format(ds.Field1, "hh:mm:ss")
> but all remains the same.
> Could you help me ?
> Thanks in advance!
> Domenico|||Thank you Rob :)
"Rob Labbe (Lowney)" wrote:
> Domenico,
> You can't do that because dates aren't stored as strings internaly. They
> are numbers.
> You could use the regular string manipualtion functions to get the result
> you want.
> =Left(ds.Field1,2) & ":" & Mid(dsField1, 3,2) & ":" & Right(ds.Field1, 2)
> should just about do it for you.
> Regards,
>
> --
> Rob Labbé, MCP, MCAD, MCSD, MCT
> Lead Architect/Trainer
> Fidelis
> Blog: http://spaces.msn.com/members/roblabbe
> "Riddick" <Riddick@.discussions.microsoft.com> wrote in message
> news:CF69816F-BEEA-497F-80B0-FE59BA0A1688@.microsoft.com...
> > Hi everybody,
> >
> > I have a string like this : "290302" and I'd like to convert into
> > the format : "29:03:02" but I can't.
> >
> > I tried this :
> > = Format(ds.FieldOra, "T") but it couldn't get the new format.
> > It displays always the same "290302".
> >
> > Also I tried with = Format(ds.Field1, "hh:mm:ss")
> > but all remains the same.
> >
> > Could you help me ?
> > Thanks in advance!
> >
> > Domenico
>
>