• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 389
  • Last Modified:

Convert Date to Long Format - Convert to Upper Case

Hi,
I am using database email and need to convert a date to long format.  How do I convert the following?

'<br/><br/>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp     Last Work Date:  ' +convert(varchar(30), @LastworkDate, 101)+

Is it possible to conver the following to upper case? or do I have to do it at the table level?

SET @themailbody = 'TO:  '+ @TrName + '     (T Manager)<br/>
0
Annette Wilson, MSIS
Asked:
Annette Wilson, MSIS
  • 5
  • 3
2 Solutions
 
HainKurtSr. System AnalystCommented:
use upper

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

SET @themailbody = 'TO:  '+ UPPER(@TrName) + '     (T Manager)<br/>
0
 
HainKurtSr. System AnalystCommented:
for datetime, remove 101
or try 103
0
 
HainKurtSr. System AnalystCommented:
use 120 for

select convert(varchar(30), getdate(),120)
2011-10-05 18:12:53
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

 
HainKurtSr. System AnalystCommented:
for full list take a look at here

http://msdn.microsoft.com/en-us/library/ms187928.aspx
0
 
Annette Wilson, MSISSr. Programmer AnalystAuthor Commented:
Looks like I'm out of luck with my meticulous client who specifically want example:

January 1, 2011 format.
0
 
Annette Wilson, MSISSr. Programmer AnalystAuthor Commented:
Thank you everyone!  it was 107
0
 
HainKurtSr. System AnalystCommented:
"Thank you everyone!" me is the everyone :)
0
 
Annette Wilson, MSISSr. Programmer AnalystAuthor Commented:
Sorry HainKurk.  Thank you!  you're fantastic!
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

  • 5
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now