unable to convert text to date format using date value

pratik salian

New Member
Joined
Aug 9, 2014
Messages
2
Hi All

I have 2 questions related to dates.

1: Im trying to convert the text Aug 07 2014 08:57 PM into a date format recognized by excel. I tried using the date value function without any success

2: Once I am able to get the date in the right format I need to calculate the time difference . Based on whether the date is a weekday or weekend, i need to calculate the time left. I wanted to know the approach to solve this problem. Should I do it with VBA or excel forumales are enough.

Please help
 

Excel Facts

Formula for Yesterday
Name Manager, New Name. Yesterday =TODAY()-1. OK. Then, use =YESTERDAY in any cell. Tomorrow could be =TODAY()+1.
Hi All

I have 2 questions related to dates.

1: Im trying to convert the text Aug 07 2014 08:57 PM into a date format recognized by excel. I tried using the date value function without any success

2: Once I am able to get the date in the right format I need to calculate the time difference . Based on whether the date is a weekday or weekend, i need to calculate the time left. I wanted to know the approach to solve this problem. Should I do it with VBA or excel forumales are enough.

Please help
I am about to go to sleep, so I don't have time to look at #2, but try this formula for #1...

=0+REPLACE(A1,7,0,",")

You will have to format the cell as a Date with Time in order to get it to display "correctly".
 
Upvote 0
I am about to go to sleep, so I don't have time to look at #2, but try this formula for #1...

=0+REPLACE(A1,7,0,",")

You will have to format the cell as a Date with Time in order to get it to display "correctly".

thnks rick..That worked :)

I have arranged rows of such dates in ascending order. Now i want to detect the dates/times that is post 3:00:00 PM time.. Ne vba code/ formulae to achieve this?
 
Upvote 0

Forum statistics

Threads
1,214,897
Messages
6,122,151
Members
449,068
Latest member
shiz11713

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top