Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Can you help me out im new here and I need to create condition from existing field name (year) to new field name. It is like befor 2000 should be it named old and after 2000 should be new. I have tried several script but it is not working for me.
My last one was
IF( YEAR(Lietadlo_Zaciatok_Prevadzky) <=1989, 'Sucasny') as Lietadlo_Klasifikacia
thanks
Yes that could be the issue, the date format may be text. You can try this:
If(Year(Date#(Date, 'DD.M.YYYY')) < 2000, 'Old', 'New') as Flag
This may or may not work, but no harm in trying this.
Best,
S
I don't really understand the field names, but generally speaking, something like this should work for you:
If(Year(Date) < 2000, 'Old', 'New') as Flag (or whatever you want to call it)
HTH
Best,
S
Yes you can use sunindia solution to create a flag and then use it to your expression .
If you want two fields Old and New
then you can use
Load
Col1
.
.
.
Date as Date,
If(Year(Date) <= 2000, Date) as Old,
If(Year(Date) > 2000, Date) as New
from ....file
now you have two columns New and old and can use as required.
Thanks
BKC
Thank you, I have it like that but it still have it only one in a row like OLD. it depend on date format??? now have it I like 15.5.1990
Yes that could be the issue, the date format may be text. You can try this:
If(Year(Date#(Date, 'DD.M.YYYY')) < 2000, 'Old', 'New') as Flag
This may or may not work, but no harm in trying this.
Best,
S
worked,thanks a lot:)
No problem! I am glad it worked.
Best,
S