uppercase lowercase

gulamdastagirgulamdastagir Member Posts: 411
hello all

In a Dataport how do u convert the following

1. 26 to 0026(integer)
2. 'NEW YORK CITY' to 'New York City'(String).Only the first letters are in CAPS
Regards,

GD

Answers

  • gulamdastagirgulamdastagir Member Posts: 411
    edited 2008-01-29
    i tried the first solution but doesnt work for me ,"No." and "Store Number" are both datatype code.

    Customer."No.":='3200-'+FORMAT(Customer."Store Number",0,'<Integer,4><Filler Character,0>');

    error is " an invalid field or attribute has been specfied for the 'format' property
    Regards,

    GD
  • SavatageSavatage Member Posts: 7,142
    how can 0026 be an integer?
    26 to 0026(integer)

    are yiou trying to add leading Zeros to make it 4 digits?

    Not sure what the final result should be here???

    Are you thinking about converting a code to text, formatting it and then converting back to code??
  • gulamdastagirgulamdastagir Member Posts: 411
    i tried the first solution but doesnt work for me ,"No." and "Store Number" are both datatype code.

    Customer."No.":='3200-'+FORMAT(Customer."Store Number",0,'<Integer,4><Filler Character,0>');

    error is " an invalid field or attribute has been specfied for the 'format' property


    EVALUATE(intSN,Customer."Store Number")
    Customer."No.":='3200-'+FORMAT(intSN,0,'<Integer,4><Filler Character,0>');

    yippy!
    Regards,

    GD
Sign In or Register to comment.