Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Excel 2010 - convert date to six-digit string 1

Status
Not open for further replies.

MeGustaXL

Technical User
Aug 6, 2003
1,055
GB
I need to express a Date as a 6-character string, which I can then CONCATENATE into a longer string. I'm in UK, so this example uses UK Date Format.

Date 22 October 2017 is in Excel as 22/10/2017. By using DAY(), MONTH() and RIGHT(A1,2) I can get 221017. Great!

But 1 April 2017 is formatted as 01/04/2017. This comes out as 1417. [frown]

How can I make sure the formula will insert the leading zeroes?

Chris

Someday I'll know what I'm donig...damn!

 
Hi,

=TEXT(YourDateRef, “DDMMYY”)

Skip,
[sub]
[glasses]Just traded in my OLD subtlety...
for a NUance![tongue][/sub]
 
Sometimes the hardest things are soooooo simple!
My colleague came up with the Winner: =TEXT(A1,"ddmmyy") [medal]

Chris

Someday I'll know what I'm donig...damn!

 
Hi Skip, Star for you too, as I gave my (other) friend a medal...you must've posted almost at the same time as me!

Chris

Someday I'll know what I'm donig...damn!

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top