Question: I have a column which states month and year `YYYY MM`. I've separated those into two columns (`Year` and `Month`). The problem is, the year is the calendar year whereas ideally I need the fiscal year I use (`Apr 01` to `Mar 31` - This will never change).

Other solutions I've seen are based on date format, whereas my original column is string.

I need a statement that returns the fiscal year for my new year column instead of the calendar year.

My current statement is:

```
Select Month,
parsename(replace(Month,' ','.'),1) as MonthM,
parsename(replace(Month,' ','.'),2) as Year
FROM TblTrade

```

Which works to separate the columns.

So expected results would be for example:
Feb 15 becomes Feb and 2015.
Apr 15 becomes Apr and 2016.

Please advise.

Answer: 
Use `__init__` to create `self.x` outside `det`:

```
import Tkinter as  tk
from threading import Thread as thread
import time

class T():
    def __init__(self):
        self.x = tk.Tk()  
    def det(self):
        self.x.mainloop()
    def det2(self):
        self.x.destroy()

k = T()
ts = thread(target=k.det, args=())
ts.start()
time.sleep(1)
k.det2()

```
After many searchs, I found this solution. Tk instance should not be created in the thread (`mainloop` sholud be outside of thread), but it can close in thread:

```
import Tkinter as  tk
from threading import Thread as thread
import time

class T():
    def det2(self,x):
        time.sleep(2)
        x.destroy()

x = tk.Tk()
ts = thread(target=T().det2, args=(x,))
ts.daemon = True
ts.start()
x.mainloop()

```