B4J Question Problem library JStringFunctions

romario87027

Active Member
Licensed User
Longtime User
I'm using JStringFunctions library to function mid. I get an error:
Parsing code. 0.04
Compiling code. Error
Error compiling program.
Error description: Current declaration does not match previous one.
Previous: {Type=String,Rank=1, RemoteObject=True}
Current: {Type=JStringFunctions,Rank=0, RemoteObject=True}
Occurred on line: 404
Dim s As JStringFunctions

B4X:
Dim s As JStringFunctions
        Dim dateSellin As String
        Dim dateSellout As String
       
            dateSellin = s.Mid(A101DTINAMG,1,2) & "/" & s.Mid(A101DTINAMG,3,2) & "/" & s.Mid(A101DTINAMG,5,2)
            dateSellout = s.Mid(A101DTFIAMG,1,2) & "/" & s.Mid(A101DTFIAMG,3,2) & "/" & s.Mid(A101DTFIAMG,5,2)
I can find another way to the mid function?
thanks
 

romario87027

Active Member
Licensed User
Longtime User
B4X:
        Dim sf  As JStringFunctions
        Dim dateSellin As String
        Dim dateSellout As String
       
            dateSellin = sf.Mid(A101DTINAMG,1,2) & "/" & sf.Mid(A101DTINAMG,3,2) & "/" & sf.Mid(A101DTINAMG,5,2)
            dateSellout = sf.Mid(A101DTFIAMG,1,2) & "/" & sf.Mid(A101DTFIAMG,3,2) & "/" & sf.Mid(A101DTFIAMG,5,2)

Thank you. I changed the variable name. S was used.
 
Upvote 0
Top