?
Solved

Get the current date in the format ddmmyy

Posted on 2007-11-21
3
Medium Priority
?
1,405 Views
Last Modified: 2012-08-14
Hi Folks,

I need to get the date in the format ddmmyy, I'm using SQL Server 2000.

I've tried using :-
DECLARE @Date varchar(15)
SET @Date = convert(varchar,getdate(),112)  

Obviously 112 is the wrong style but I can't find a style in the documentation that converts to the format ddmmyy.

Any ideas?

Cheers

Pete

0
Comment
Question by:Pete_Burke
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 75

Accepted Solution

by:
Aneesh Retnakaran earned 260 total points
ID: 20326622
Hello Pete_Burke,


DECLARE @Date varchar(15)
SET @Date = REPLACE(convert(varchar,getdate(),3),'/','')

Aneesh R
0
 
LVL 143

Assisted Solution

by:Guy Hengel [angelIII / a3]
Guy Hengel [angelIII / a3] earned 240 total points
ID: 20326625
DECLARE @Date varchar(15)
SET @Date = replace(convert(varchar,getdate(),3), '/', '')
0
 

Author Closing Comment

by:Pete_Burke
ID: 31410329
Split the points as the solutions arrived at the same time
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.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Slowly Changing Dimension Transformation component in data task flow is very useful for us to manage and control how data changes in SSIS.
For both online and offline retail, the cross-channel business is the most recent pattern in the B2C trade space.
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function
Via a live example, show how to setup several different housekeeping processes for a SQL Server.

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question