user3348557
user3348557

Reputation: 89

How to format a date to "MM/dd"

So I currently have a field that is outputting dates as

03/26/14

This is a weird question, but is there anyway where I can have the date output without the year?

I would like the date to look like

03/26

Thanks!

Upvotes: 0

Views: 47

Answers (2)

Tom
Tom

Reputation: 7740

If using SQL Server, you could:

SELECT CONVERT(VARCHAR(5), GETDATE(), 101)

Upvotes: 1

Hamlet Hakobyan
Hamlet Hakobyan

Reputation: 33381

Use this:

SELECT CONVERT(VARCHAR(5), GETDATE(), 03)

Upvotes: 0

Related Questions