[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 365
  • 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
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

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

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

January 1, 2011 format.
0
 
Annette Wilson, MSISAuthor Commented:
Thank you everyone!  it was 107
0
 
HainKurtSr. System AnalystCommented:
"Thank you everyone!" me is the everyone :)
0
 
Annette Wilson, MSISAuthor Commented:
Sorry HainKurk.  Thank you!  you're fantastic!
0

Featured Post

Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

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