Timestamp to date - Excel 2010

jubilee101

New Member
Joined
Apr 17, 2013
Messages
25
Hi All, This is driving me nuts. I have a report which I have exported from a webpage into excel format. I want to equate a timestamp (10/15/2015 8:36:16 AM) to a Work Week number. Would usually do this by =WEEKNUM(A1,2). However getting the #VALUE error.

So figured the timestamp must be in text format. (My locale format setting are English - Ireland, date imported is in US format)

Have tried several things, here are a few:
=int(A1) Get #VALUE error
=DATEVALUE() - #Value error
=DATE(MID(S2,8,4),MONTH(DATEVALUE(LEFT(S2,3)&" 1")),MID(S2,5,2))

have also tried text to columns to strip out the date and chose M-D-Y as format. but no joy.
 
Last edited:

Excel Facts

Select a hidden cell
Somehide hide payroll data in column G? Press F5. Type G1. Enter. Look in formula bar while you arrow down through G.
What happens when you wrap the timestamp figure in the function NUMBERVALUE? Try that and then create a test cell that refers to it and adds 1.
 
Upvote 0
Can you type here an example of what December 15 2015 should look in your system and what the date looks like that you import? It appears that Excel does not recognise the value as a date and delivers it as text. Hence any attempt to treat it as a date (with Int() or DateValue()) will fail. Your last formula might work if you extract the month with a MID() function as well instead of a DateValue().

cheers, teylyn
 
Upvote 0

Forum statistics

Threads
1,214,832
Messages
6,121,849
Members
449,051
Latest member
excelquestion515

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