Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 61
Default Date conversion

I'm wanting to convert a date to a related symbol string.

Example: 7/16/21 to "210716"

12/17/21 to "212217"
Note that when month has a single digit, a "0" must be added before it in the string.

Can't figure out how to do it using Excel functions. Any ideas would be greatly appreciated.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,872
Default Date conversion

Hi,

Am Mon, 5 Apr 2021 14:28:14 -0700 (PDT) schrieb programmernovice:

I'm wanting to convert a date to a related symbol string.

Example: 7/16/21 to "210716"

12/17/21 to "212217"
Note that when month has a single digit, a "0" must be added before it in the string.


try:
=RIGHT(YEAR(A1),2)&TEXT(MONTH(A1),"00")& TEXT(DAY(A1),"00")

Regards
Claus B.
--
Windows10
Microsoft 365 for business
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 61
Default Date conversion


try:
=RIGHT(YEAR(A1),2)&TEXT(MONTH(A1),"00")& TEXT(DAY(A1),"00")




Perfect! Many thanks for your help, Klaus. If memory serves, you've always been helpful to me and I appreciate it.
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Date Conversion Help Saucer Man Excel Programming 4 May 22nd 09 04:24 PM
date conversion ranvin56 Excel Discussion (Misc queries) 2 January 3rd 08 10:50 PM
Date conversion Tom Excel Discussion (Misc queries) 7 January 2nd 07 10:47 PM
Date conversion Kristiaaan Excel Discussion (Misc queries) 5 July 30th 05 05:49 AM
date conversion rdunne Excel Worksheet Functions 2 April 12th 05 10:41 PM


All times are GMT +1. The time now is 09:43 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"