Remove time from date stamp

General Ledger

Active Member
Joined
Dec 31, 2007
Messages
460
I have a table of transactions and each record has a date and time stamp.I don’t care about the time portion.Must I create a calculated column in order to get a field of transaction dates?Is there a way to truncate the date and time field before it comes into my table in PowerPivot?I don’t have the ability to make changes to the table in the database. What is the best function to use to trim the time off a date field? I am very new to PowerPivot and using Excel 2010.

Thanks,

G/L
 

Excel Facts

Can you AutoAverage in Excel?
There is a drop-down next to the AutoSum symbol. Open the drop-down to choose AVERAGE, COUNT, MAX, or MIN
Hi

I use below formula to separate the date and time from on a workshsheet.

To extract date =C4-MOD(C4,1)

To extract time =MOD(C4,1)

Hope this would be of any help to you.
 
Upvote 0
I mostly use =DATEVALUE(transactionstable[datetimestamp] in a calculated column once the data is in the PP window
 
Upvote 0
If at all possible, get rid of the time BEFORE it gets to Power Pivot. SQL is possible, otherwise... Power Query.
 
Upvote 0
G/L,

Scott has good advice - trim the Time portion off before it lands in Power Pivot (rather than a calculated column), mostly for performance reasons. You do not need to make changes to the table in order to do that. It wasn't clear what your data source is. If it is SQL, you can use CAST([datecolumn] as Date) to trim out the Time portion.

Avi
www.PowerPivotPro.com
 
Upvote 0

Forum statistics

Threads
1,215,873
Messages
6,127,451
Members
449,383
Latest member
DonnaRisso

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