Sort Content in drupal 6 views using date and time seperate fields - drupal-6

I've two separate fields of date and time and i added these fields in the sorting portion of the view. When i see results, results are different as i expect. example is given below.
contents having these values regarding date and time i get this result in the same manner...
12-jan-2012 and time 2:00pm
12-jan-2012 and time 3:00pm
13-jan-2012 and time 1:00pm
12-feb-2012 and time 2:00am
12-march-2012 and time 2:00pm
I want to sort by date and time and results should be
12-jan-2012 and time 1:00pm
12-jan-2012 and time 2:00pm
13-jan-2012 and time 3:00pm
12-feb-2012 and time 2:00am
12-march-2012 and time 2:00pm
Please suggest how can i handle this situation in the drupal views.
thanks in advance....

In Sort criteria section, add "Node: post date" field and then choose Ascending radio button.
You will get the ascending result or you can use "table" style and choose asc.

Related

Total Page Count for Each Day

I have a spreadsheet that an audit of all print job.
The issue is there isn't a way to just see the total of print jobs for the day. That's all my client needs, they don't want to see everything else.
I've found it challenging to work with the Date field because it also has a time stamp.
In another spreadsheet I called the date column and used formula =INT(O2) to strip off the time stamp. Then used =UNIQUE(N2:N5000) to consolidate all the dates down to just one row per day.
But I have no idea how to group 'Total Printed Pages' by 'Date', then get the sum of each group.

How to Subtract a value from the oldest expiration date and move to the next once it hits zero?

I work for an organization and I am working on a way to better organize our part numbers that have expiration dates. I've started off by making an Excel sheet that has the part number multiple times based on the expiration date and then had the matching quantities of that expiration date. What im trying to do is what you always do in life, if something is going to go bad use up the one that will expire first. But now trying to do this in an excel table automatically. This is my Ex: my master log where they will put in the Part#, expiration date, and quantity, this is where most info will be pulled from.
I am now on to taking away our companies forecasted usage of these parts away from these quantities to show an overall usage over the months and pairing the intersecting expiration dates. I’ve got the Usage by using a pivot table to total these part numbers quantities. And I’ve made a chart mapping the overall usage to part quantity forecast with it being flagged if the expiration date interferes with the actual date. This is the forcasting for what we plan to use of each part #
This is me subtracting the usage number from the inventory of those part numbers and it being flagged when it expires.
=IF((IF((VLOOKUP($F60,Expires!$1:$1048576, 10, FALSE))<Sheet1!G$58, "Bad", "Good"))="good", T33, "Expired")
I used this function, my vlookup pulling from my first sheet and pulling the part numbers expiration date and if it is <the date up top (9/1,10/1 etc.) then it will be flagged as expired and wont even show the usage. T33 is simply pulling the fromual from another table which is just quantity- usage. Please lmk if this looks right my vlookup turns out pulls the latest expiration date from the multiple part #s.
But that is with total quantities, not separated based on the part number expiration dates. What I am wondering is how can I make a table like this but subtracts the usage from quantity of the part number that will expire first? Then after that quantity hits zero it takes away the usage from the next one due to expire? But also I want the Numbers to be able to auto populate from the sheet where the user enters the data (master log).
So this is what it will be doing and will look like the table above multiple of the same part number. Whats happening now
But needs to look like this Final table and add the part number to the list and quantity as they are entered in the master log. I was trying to do a Vlookup(MIN and take the part number from the other table based on the lowest expiration date first but I don’t think excel is capable of that, I’m not sure here.
Please help, thank you!

Excel: Get the days delayed from Start date to End date Using DatedIF?

I have a sample data here that I want to get the days delayed.
As you can see,
The data shows the records for those users who did not submit their project, users who submitted on-time, and users who actually dont submit their project.
Currently,
I have this formula
=DATEDIF(A2,B2,"d")
for the first row to calculate the days delayed of first row.
Can I add in this formula that detects if the user dont submit their project and the delayed days continues counting for day delayed? Like for example the data on row 4. The column submitted_project is blank means the user still dont submit their project the days delayed will start counting after the deadline.
You don't need DateDif for that. (By the way it's Date-Dif for "date difference", not Dated-If)
You can simply subtract the two dates from each other and format the result as a number.
DateDif expects the earlier date as the first parameter, that's why it errors when the first parameter is the later date, i.e. when the project was submitted before the due date.
But with simple subtraction like =B2-A2 you can get the correct result. Better even, to check that both cells have dates before doing the calculation, to avoid misleading results, so
=if(count(A2:B2)=2,B2-A2,"")
Edit after comment: Yes.
=IF(COUNT(A5:B5)=2,B5-A5,IF(B5="",TODAY()-A5))

Need to group Time Slots in Excel

I am working on logistics data. I have booking being made throughout the day at regular intervals from start to the end of the day.
Now these booking are consistent and I have time from like
04:45
21:10
21:10
06:07
05:44
05:45
05:45
05:45
etc.
Now as there are multiple bookings I need to group them such as
04:00- 05:00 (1 hours)- this should capture all booking made during this period.
Similar for other hours during the day.
By doing this I will be able to group individual values into specific group. Can you please advice how to achieve the same in excel.
If the values are stored as dates in Excel, the Pivot Table has this functionality built in already with the "Group Field" option. You can group by Hours which is probably what you want. Note that you can select multiple items to get a hierarchy of groups as shown below. This will break if the underlying data is not formatted as a Date so watch out for that.
If you do not have true dates and just have times, you can format as a Time in Excel and it will work. Just don't show the days/date because it will be gibberish.
add a column truncating the time to hours
along the lines of =time(hour(z),0,0)
then create a pivot table using the hour column

Attendance Calculations / Period Calendar

This is a multi-tiered project. Let me give a quick overview. I have attendance data, card/ timestamp punches. I would like to have a pivot table with slicers in Excel. Ideally you'd be able to choose a department / last name / associate number. And also a period of time. Ideally this would be a table with the company period/week. And maybe default to last weeks.
I can get at timecard data in two ways:
(1) generate a CSV that automatically performs the timecard math, to figure out how many hours someone worked and it is smart enough to understand 3rd shift workers. The format of that CSV is:
Last Name, First Name, Personnel Type, Associate Number, Facility, Department, TimeIn, TimeOut, Total Hours
The problem with this method is that I would have to manually append the information to the CSV tables. Or come up with some autoIT script.
(2) Get at the raw data via sql/odbc. This way the math is not done. It is just all of the associates timestamps. I would have to figure up the daily hours myself and figure out a 3rd shift formula too. It is not a set schedule, many people swing shifts and others get called in a lot.
Lastly, I would like to be able to filter the dates by using our company fiscal calendar. I have a spreadsheet that goes from 2000 to 2093. With everyday listed and it's corresponding year/period/week.
Example period info spreadsheet:
date Year Period week WeekTotal Period Total
12/3/2007 2008 1 1 2008.1.1 2008.1
12/4/2007 2008 1 1 2008.1.1 2008.1
I know there is a lot going on here, but what would be the best way to approach this project?
First I have not been able to post any script however the last I tried it I used two options 1. Was a php conversion where the time was numbers ( which makes it easier for calculations)
2. Was in the tables where I deliberately entered the values places the time in different columns or fields for hours, mins, and seconds this meant that while the input is eased I still have to calculate the output in php especially for totals, averages and differences.
Hope it helps a bit

Resources