I need to write an SQL Function (UDF) to find the First Day (int) and the Last Day (int) when I specify a date.
For example: When I specify (20130217) (i.e. Feb 17th, 2013), I should be able to find the First Day (01) and the Last Day (28) for the specified month (in this case, Feb).
How can I do that? Please provide the necessary code to implement this feature in my SQL Function.
Thanks.
For example: When I specify (20130217) (i.e. Feb 17th, 2013), I should be able to find the First Day (01) and the Last Day (28) for the specified month (in this case, Feb).
How can I do that? Please provide the necessary code to implement this feature in my SQL Function.
Thanks.
Comment