Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default date conversion from m/d/yyyy to yyyymmdd

I have a cell with a custom date format of m/d/yyyy h:mm,
I need to convert the date to yyyymmdd text. Does anyone
have a VB macro code snippet to do something like this?
I've tried text to columns but can't get it to work...any
help is appreciated.

Thanks.

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 620
Default date conversion from m/d/yyyy to yyyymmdd

Jeff,

See response in misc group

--

HTH

Bob Phillips

"jeff" wrote in message
...
I have a cell with a custom date format of m/d/yyyy h:mm,
I need to convert the date to yyyymmdd text. Does anyone
have a VB macro code snippet to do something like this?
I've tried text to columns but can't get it to work...any
help is appreciated.

Thanks.



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27
Default date conversion from m/d/yyyy to yyyymmdd

You aren't clear. Does the cell CONTAIN as date or is it
just the format that you want to change?
Try changing the format to General. If its a 'date' you
will see the cell value as a number like 36752. If you
still see a text date, then the cell is text.
You could convert to a date using the DateValue()
function.
Now all you need to do is formatthe cell yyyymmdd

if you need the text in a cell
=TEXT(DateValue(A1),"YYYYMMDD")
where A1 is your text date

HTh
Patrick Molloy
Microsoft Excel MVP



-----Original Message-----
I have a cell with a custom date format of m/d/yyyy

h:mm,
I need to convert the date to yyyymmdd text. Does

anyone
have a VB macro code snippet to do something like this?
I've tried text to columns but can't get it to

work...any
help is appreciated.

Thanks.

.

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
how do I convert date format yyyymmdd to mm/dd/yyyy Datahead Excel Worksheet Functions 3 May 11th 23 11:45 AM
how do I change the date format from yyyymmdd to mm/dd/yyyy Charlene Excel Worksheet Functions 5 May 6th 23 07:46 PM
Date Conversion dd.mm.yyyy to dd/mm/yyyy ScottRA Excel Worksheet Functions 1 September 5th 07 06:42 AM
Converting yyyymm and yyyymmdd to "mmm dd, yyyy" James Excel Discussion (Misc queries) 3 April 5th 07 06:38 PM
basically want to go from mm/dd/yyyy to yyyymmdd clegge Excel Worksheet Functions 2 January 10th 06 04:41 PM


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

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

About Us

"It's about Microsoft Excel"