Skip to main content

Today is 2019-SEP-20

%Y = 2019 / Year

%b = Sep / Month

%a = Fri / Day Name

%d = 20 / Day

%u = 37 / Week of Year

??? = 3 (3rd Friday of September)

What I'm trying to find this is the 3rd Friday this month?

ie

2019-SEP-06 is the 1st Friday of September

2019-SEP-13 is the 2nd Friday of September

2019-SEP-30 is the 3rd Friday of September

2019-SEP-27 is the 4th Friday of September

Hi @hlouie

 

Do you if there is a python code to do this operation?

 

Thanks in Advance,

Danilo


Yes, but I wanted to check out pure FME first.

datetime.datetime(2011, 8, 15) // should return 3
datetime.datetime(2011, 2, 28) // should return 5
datetime.datetime(2011, 8, 29) // should return 5

Hi @hlouie, I don't think there is a single function to return your required text, but you can achieve that with some FME String, Math, and Date/Time functions. e.g. assuming that an attribute called "_date" stores a date value formatted with %Y-%b-%d (e.g. "2019-SEP-20")

See these documentations to learn more about those functions.

Result:


Reply