Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Jane
 
Posts: n/a
Default Need help with date & time formula

Can anyone help me create a formula to convert the following date and time to:

12102004 5:00 pm ------ 12/10/2004 5:00 pm


thanks
  #2   Report Post  
JE McGimpsey
 
Posts: n/a
Default

One way:

=TEXT(LEFT(A1,8),"00\/00\/0000")+MID(A1,10,255)


In article ,
"Jane" wrote:

Can anyone help me create a formula to convert the following date and time to:

12102004 5:00 pm ------ 12/10/2004 5:00 pm


thanks

  #3   Report Post  
Peo Sjoblom
 
Posts: n/a
Default

Select the column, do datatext to columns
click fixed width, click next, remove the line between 5.00 and pm by double
clicking it, click finish
That will give you one column with the date and one with the time
now select the column with the date, repeat but do not select any delimiter
just click next twice, under column data format select date and MDY, click
finish

Now in a third column do A1+B1 and format it as dd/mm/yy hh:mm


If you need a formula, this might work (not tested extensively, it should
work as long as the days and the years are 2 respectively 4 digits, months
can be one or two digits for Jan-Sep)

=DATE(RIGHT(LEFT(A2,FIND(" ",A2)-1),4),MID(LEFT(A2,FIND("
",A2)-1),LEN(LEFT(A2,FIND(" ",A2)-1))-5,2),LEFT(LEFT(A2,FIND("
",A2)-1),LEN(LEFT(A2,FIND(" ",A2)-1))-6))+TRIM(MID(A2,9,255))


Regards,

Peo Sjoblom


"Jane" wrote:

Can anyone help me create a formula to convert the following date and time to:

12102004 5:00 pm ------ 12/10/2004 5:00 pm


thanks

  #4   Report Post  
Peo Sjoblom
 
Posts: n/a
Default

Doh!

Regards,

Peo Sjoblom

"JE McGimpsey" wrote:

One way:

=TEXT(LEFT(A1,8),"00\/00\/0000")+MID(A1,10,255)


In article ,
"Jane" wrote:

Can anyone help me create a formula to convert the following date and time to:

12102004 5:00 pm ------ 12/10/2004 5:00 pm


thanks


  #5   Report Post  
Peo Sjoblom
 
Posts: n/a
Default

Change the formula to

=DATE(RIGHT(LEFT(A1,FIND(" ",A1)-1),4),MID(LEFT(A1,FIND("
",A1)-1),LEN(LEFT(A1,FIND(" ",A1)-1))-5,2),LEFT(LEFT(A1,FIND("
",A1)-1),LEN(LEFT(A1,FIND(" ",A1)-1))-6))+TRIM(MID(A1,FIND(" ",A1),255))

Regards,

Peo Sjoblom

"Peo Sjoblom" wrote:

Select the column, do datatext to columns
click fixed width, click next, remove the line between 5.00 and pm by double
clicking it, click finish
That will give you one column with the date and one with the time
now select the column with the date, repeat but do not select any delimiter
just click next twice, under column data format select date and MDY, click
finish

Now in a third column do A1+B1 and format it as dd/mm/yy hh:mm


If you need a formula, this might work (not tested extensively, it should
work as long as the days and the years are 2 respectively 4 digits, months
can be one or two digits for Jan-Sep)

=DATE(RIGHT(LEFT(A2,FIND(" ",A2)-1),4),MID(LEFT(A2,FIND("
",A2)-1),LEN(LEFT(A2,FIND(" ",A2)-1))-5,2),LEFT(LEFT(A2,FIND("
",A2)-1),LEN(LEFT(A2,FIND(" ",A2)-1))-6))+TRIM(MID(A2,9,255))


Regards,

Peo Sjoblom


"Jane" wrote:

Can anyone help me create a formula to convert the following date and time to:

12102004 5:00 pm ------ 12/10/2004 5:00 pm


thanks



  #6   Report Post  
Jane
 
Posts: n/a
Default

Thank you!!!! that worked great!!!

"Peo Sjoblom" wrote:

Doh!

Regards,

Peo Sjoblom

"JE McGimpsey" wrote:

One way:

=TEXT(LEFT(A1,8),"00\/00\/0000")+MID(A1,10,255)


In article ,
"Jane" wrote:

Can anyone help me create a formula to convert the following date and time to:

12102004 5:00 pm ------ 12/10/2004 5:00 pm


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
Automatically enter date and time but only update once. PM New Users to Excel 3 January 21st 05 07:47 AM
Help - Information with time and date PM Excel Discussion (Misc queries) 4 January 6th 05 08:25 AM
Combined date time cell to separate date & time components Mark Ada Excel Discussion (Misc queries) 1 December 2nd 04 12:07 AM
Combined date time cell to separate date & time components Mark Ada Excel Discussion (Misc queries) 1 December 2nd 04 12:07 AM
time and date formula Brian Excel Worksheet Functions 3 November 30th 04 02:59 AM


All times are GMT +1. The time now is 10:52 AM.

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"