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

SQL 2000 View Syntax

I have a date field (Format datetime length 8) and want to convert it to

YearMonth e.g. 201203

Can anyone help?
0
HKFuey
Asked:
HKFuey
  • 2
1 Solution
 
HKFueyAuthor Commented:
OK sussed it: -
CONVERT(VARCHAR(7), dbo.MyTable.MyDate, 111) AS YearMonth

Returns 2012/03
0
 
HKFueyAuthor Commented:
Sorted
0

Featured Post

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.

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