Date & Time Syntax

k602570

New Member
Joined
May 28, 2013
Messages
4
Hi,

I m have a dataset that includes a time column, it loads to PP as a date. 12/30/1899 12:00:00 AM as an example. Based on the values, I'd like to put the time into "buckets": such as: Midnight to 6AM, 6AM to 10AM etc. I have tried to create a calculated column - If(and([Time] > 12/30/1899 11:59:59 PM, [Time]<= 12/30/1899 06:00:00 AM, "Midnight to 6AM", ""), but it's telling me the syntax for 11 in incorrect. I have tried multiple variations, any ideas?
Thanks in advance as all/any help is appreciated.

Kathy
 

Excel Facts

Copy a format multiple times
Select a formatted range. Double-click the Format Painter (left side of Home tab). You can paste formatting multiple times. Esc to stop
I have encountered this by creating interval columns. Could be 10, 15, 30, any you'd need.

Interval:= IF(MINUTE([Time] >=30, HOUR([Time] + 0.5, HOUR[Time])

There are other variants, of course.
 
Upvote 0

Forum statistics

Threads
1,226,693
Messages
6,192,465
Members
453,725
Latest member
cvsdatreas

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