×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Excel 2010 - convert date to six-digit string

Excel 2010 - convert date to six-digit string

Excel 2010 - convert date to six-digit string

(OP)
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!

RE: Excel 2010 - convert date to six-digit string

Hi,

=TEXT(YourDateRef, “DDMMYY”)

Skip,

glassesJust traded in my OLD subtlety...
for a NUance!tongue

RE: Excel 2010 - convert date to six-digit string

(OP)
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!

RE: Excel 2010 - convert date to six-digit string

(OP)
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!

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close