soonhuat ong wrote:
> Currently i wrote a StoreProc to get today date.
> Anyway, I want the date to have the following format:
>
> '22nd day of May 2008' .. How can i do it ??

Looks like you could use CONVERT to put the date into a known string
format, and then use SUBSTRING to extract the pieces you need. Use CASE to
get the right ordinal to append to the date, and then concatenate
everything. See the Microsoft documentation for details on those
functions.

http://msdn.microsoft.com/en-us/library/ms187928.aspx

> I use DatePart function, but it will only return me the integer value ..
> How can i get something like 'May', or 22nd ??

CASE, I suspect.

> I know this can be done using Delphi FormatDateTime .. but i need it in
> my StoreProc.. Anyone

Since you're asking about how to write T-SQL, have you considered asking
in a T-SQL forum? This mailing list is for Delphi.

-- 
Rob


Reply via email to