I have a phone number as 0396526888. if I were to format this to say +61 3
9652 6888 how would I go about working on this.
Any help would be helpful. thanks heaps
Regards
RidhimaOn Sep 3, 12:26 am, Ridhima Sood
<RidhimaS...@.discussions.microsoft.com> wrote:
> I have a phone number as 0396526888. if I were to format this to say +61 3
> 9652 6888 how would I go about working on this.
> Any help would be helpful. thanks heaps
> Regards
> Ridhima
Assuming that there was a field called PhoneNumber set to 0396526888,
you would use an expression similar to the following:
= "+61 " + Left(Fields!PhoneNumber.Value, 2) + " " + Fields!
PhoneNumber.Value.Substring(3, 4) + " " + Right(Fields!
PhoneNumber.Value, 4)
Of course, you could use the 'Mid' function in place of the
'Substring' function. Also, you might want to use CStr(CInt(...))
around the 'Left' part of the expression to get rid of the zero.
Hope this helps.
Regards,
Enrique Martinez
Sr. Software Consultant|||You could also simply use the following format code:
+61 ## #### ####
Assuming you have a static length (10) and you will alway append +61.
Let me know if you have questions...
"EMartinez" wrote:
> On Sep 3, 12:26 am, Ridhima Sood
> <RidhimaS...@.discussions.microsoft.com> wrote:
> > I have a phone number as 0396526888. if I were to format this to say +61 3
> > 9652 6888 how would I go about working on this.
> >
> > Any help would be helpful. thanks heaps
> >
> > Regards
> > Ridhima
>
> Assuming that there was a field called PhoneNumber set to 0396526888,
> you would use an expression similar to the following:
> = "+61 " + Left(Fields!PhoneNumber.Value, 2) + " " + Fields!
> PhoneNumber.Value.Substring(3, 4) + " " + Right(Fields!
> PhoneNumber.Value, 4)
> Of course, you could use the 'Mid' function in place of the
> 'Substring' function. Also, you might want to use CStr(CInt(...))
> around the 'Left' part of the expression to get rid of the zero.
> Hope this helps.
> Regards,
> Enrique Martinez
> Sr. Software Consultant
>sql
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment