1

Topic: Manipulations with date

Good afternoon!
Now I pass with Orcale on MS SQL
Prompt, whether there is an analog of function To_char in MS SQL?
Let's admit, it is necessary to divide year into seasons, I would write to Oracle:
case when to_char (date, ' dd_mm ') between ' 01_12 ' and ' 28_02 ' then ' Winter ' end Season
And .
How to implement such logic in MS SQL
For earlier I ask not ,  to in sql while
Thanks

2

Re: Manipulations with date

case when month (date) in (1,2,12) then ' Winter ' end Season

3

Re: Manipulations with date

Prolog;
Thanks, work.
You can explain syntax how to apply?

4

Re: Manipulations with date

Prolog;
I understood all!
Thanks once again!

5

Re: Manipulations with date

And for shooting gallery conversion datetime in varchar and reversely there is a function convert ().

6

Re: Manipulations with date

Patucho;
On February, 29th at
case when to_char (date, ' dd_mm ') between ' 01_12 ' and ' 28_02 ' then ' Winter ' end Season
Falls out of a season, if year .

7

Re: Manipulations with date

Patucho wrote:

for earlier I ask not ,  to in sql while

in dock it is possible to esteem here

8

Re: Manipulations with date

wrote:

it is passed...
In dock it is possible to esteem here

Was specific about dates - here