cancel
Showing results for 
Search instead for 
Did you mean: 

Read Bex Variable value in Crystal Reports formula

Former Member
0 Kudos

All, I am entering a value as '201303 - MAR 2013' to a BEX Variable. When I read this value in the formula I am getting MAR 2013 but I need 201303. Do you know anyone how to read first part of the Variable value with function?

Thanks,

Pad

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member205840
Active Contributor
0 Kudos

Hi Pad,

You  can use following if variable is a string :

left({variable},6)    // This will extract first 6 characters.

If your variable is a date then :

ToText(Month({?variable},"##"))&Totext(Year({?variable}."####"))

Thanks,

Sastry