ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   help needed in converting date format (https://www.excelbanter.com/excel-programming/388174-help-needed-converting-date-format.html)

kiwis

help needed in converting date format
 
Hi

i have date in dd/mm/yyyy format, i need to find the age of the
product but
i think i need to convert the date to mm/dd/yyyy format 1st before
using the formula
to find the age of the product.

sample data final result
column b column c
28/12/2003 12/28/2003
2/5/2001 5/2/2001

i need to write a macro to change column b to the output shown in
column c.

How do i go abt doing writing this ?

ANy ideas or sample code to share?

Thank you

rgds
kiwis


Mike

help needed in converting date format
 
Sub formatdates()
ActiveSheet.Select
Columns("B:B").Select
Selection.NumberFormat = "mm/dd/yyyy"
Range("B1").Select
End Sub

"kiwis" wrote:

Hi

i have date in dd/mm/yyyy format, i need to find the age of the
product but
i think i need to convert the date to mm/dd/yyyy format 1st before
using the formula
to find the age of the product.

sample data final result
column b column c
28/12/2003 12/28/2003
2/5/2001 5/2/2001

i need to write a macro to change column b to the output shown in
column c.

How do i go abt doing writing this ?

ANy ideas or sample code to share?

Thank you

rgds
kiwis




All times are GMT +1. The time now is 07:28 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com