Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi.
I am loading data from a table and would like to remove the last ten characters (YYYY-MM-DD) from the field 'Bevakning'. The total length of the string can vary and it can consist of text, numbers or both, separated by blanks, but the last ten characters are always a date formatet as YYYY-MM-DD.
BEVAKNING
123 2017-03-01
Ändra förväntat belopp 2017-02-27
I want it like
BEVAKNING
123
Ändra förväntat belopp
Anyone who can help me solve this one?
Thank you!
Anna
Left(Field,Len(Field)-10)
something like:
mid(field,1,len(field)-10)
Left(Field,Len(Field)-10)
yeah I have no idea why I chose mid over left
Left(Field,Len(Field)-11) // 10 positions to get rid of date + 1 for the leading space
check this
Tried again and it worked. Thanks a lot!
maybe using
Trim(Left(BEVAKNING,Len(BEVAKNING)-10)) as BEVAKNING
to get rid of possible trailing spaces ...
hope this helps
regards
Marco