Search Results

Search found 5124 results on 205 pages for 'week'.

Page 12/205 | < Previous Page | 8 9 10 11 12 13 14 15 16 17 18 19  | Next Page >

  • MySQL SUM Query daily values of a week problem

    - by davykiash
    Am trying to return the sum of each day of a week in mysql but it returns nothing despite having values for the 3rd Week of March 2010 SELECT SUM(expense_details_amount) AS total FROM expense_details WHERE YEAR(expense_details_date) = '2010' AND MONTH(expense_details_date) = '03' AND WEEK(expense_details_date) = '3' GROUP BY DAY(expense_details_date) How do I go about this?

    Read the article

  • Approaches to a week long camp programming course (tips & projects)

    - by Good Person
    I will be teaching a week long programming course to kids between the ages of 11-18. Most of the kids have no programming experience. I'm looking for two things 1) General tips for teaching a camp class (how to make it fun when explaining the difference between int and float) 2) Interesting projects that the kids will be able to complete by the end of the week. Unfortunately the language I'll be required to use is either c++ or Java which means that I'll need to spend more time on itty bitty details than I'd like in a week long course. I feel more competent in c++ than in Java. However if someone can show me that Java is much easier to learn I'll probably teach that instead. My initial idea is to try something like "a game a day" with games like hangman, tic-tac-toe, guess-a-number, wheel-of-fortune, etc. I'll try and update the question text as answers come in to offer more details While there are other questions about teaching programming around I'm looking for advice and tasks that are useful for specifically a week long camp

    Read the article

  • Make backups of Dropbox folder every week

    - by ilansch
    I have a Dropbox folder which is shared by couple of users. I would like to make a backup of this folder that will occur every week and store this backup on another hard drive. I can simply copy the entire folder each time and this will be the backup, but I would like to copy only the files that have been changed or created during that week. I thought of creating a batch script that will check each file in the Dropbox folder recursively and see its modified date. If that date is later then a given one (current backup date) it will copy the file to a folder named BackUP[Date]. Do you think this solution is OK?

    Read the article

  • Going for Gold

    - by Simple-Talk Editorial Team
    There was a spring in the step of some members of our development teams here at Red Gate, on hearing that on five gold awards at 2012′s SQL Mag Community and Editors Choice Awards. And why not? It’s a nice recognition that their efforts were appreciated by many in the SQL Server community. The team at Simple-Talk don’t tend to spring, but even we felt a twinge of pride in the fact that SQL Scripts Manager received Gold for Editor’s Choice in the Best Free Tools category. The tool began life as a “Down Tools” project and is one that we’ve supported and championed in various articles on Simple-talk.com. Over a Cambridge Bitter in the Waggon and Horses, we’ve often reflected on how nice it would be to nominate our own awards. Of course, we’d have to avoid nominating Red Gate tools in each category, even the free ones, for fear of seeming biased,  but we could still award other people’s free tools, couldn’t we? So allow us to set the stage for the annual Simple-Talk Community Tool awards… Onto the platform we shuffle, to applause from the audience; Chris in immaculate tuxedo, Alice in stunning evening gown, Dave and Tony looking vaguely uncomfortable, Andrew somehow distracted, as if his mind is elsewhere. Tony strides up to the lectern, and coughs lightly…”In the free-tool category we have the three nominations, and they are…” (rustle of the envelope opening) Ola Hallengren’s SQL Server Maintenance Solution (applause) Adam Machanic’s WhoIsActive (cheers, more applause) Brent Ozar’s sp_Blitz (much clapping) “Before we declare the winner, I’d like to say a few words in recognition of a grand tradition in a SQL Server community that continues to offer its members a steady supply of excellent, free tools. It hammers home the fundamental principle that a tool should solve a single, pressing and frustrating problem, but you should only ever build your own solution to that problem if you are certain that you cannot buy it, or that someone has not already provided it free. We have only three finalists tonight, but I feel compelled to mention a few other tools that we also use and appreciate, such as Microsoft’s Logparser, Open source Curl, Microsoft’s TableDiff.exe, Performance Analysis of Logs (PAL) Tool, SQL Server Cache Manager and SQLPSX.” “And now I’ll hand over to Alice to announce the winner.” Alice strides over to the microphone, tearing open the envelope. “The winner,” she pauses for dramatic effect “… is …Ola Hallengren’s SQL Server Maintenance Solution!” Queue much applause and consumption of champagne. Did we get it wrong? What free tool would you nominate? Let us know! Cheers, Simple-Talk Editorial Team (Andrew, Alice, Chris, Dave, Tony)

    Read the article

  • Most watched videos this week

    - by Jan Hancic
    I have a youtube like web-page where users upload&watch videos. I would like to add a "most watched videos this week" list of videos to my page. But this list should not contain just the videos that ware uploaded in the previous week, but all videos. I'm currently recording views in a column, so I have no information on when a video was watched. So now I'm searching for a solution to how to record this data. The first is the most obvious (and the correct one, as far as I know): have a separate table in which you insert a new line every time you want to record a new view (storing the ID of the video and the timestamp). I'm worried that I would quickly get huge amounts of data in this table, and queries using this table would be extremely slow (we get about 3 million views a month). The second solution isn't as flexible but is more easy on the database. I would add 7 columns to the "videos" table (one for each day of the week): views_monday, views_tuesday , views_wednesday, ... And increment the value in the correct column based on the day it is. And I would reset the current day's column to 0 at midnight. I could then easily get the most watched videos of the week by summing this 7 columns. What do you think, should I bother with the first solution or will the second one suffice for my case? If you have a better solution please share! Oh, I'm using MySQL.

    Read the article

  • find rows that fall between a day and time of the week in sql server

    - by Corgalore
    I have a table of rows in MS SQL that contain a start and end day of the week, hour, and time. I need a T-SQL query that can pull rows from that table where GETDATE matches the day of week and time of those rows. Specifically, I need the query to work if a row has a day/time that starts on one day of the week and ends on the next day. Here's the structure I'm working with: _start_day_of_week (int) = 5_start_hour (int) = 15_start_minute (int) = 30 _end_day_of_week (int) = 6_end_hour (int) = 2 _end_minute (int) = 30 _title (string) = 'My Sample Row' _id (int) = 1 How would I retrieve this row given the current DATETIME?

    Read the article

  • Problem in getting week number of sundays , in zend

    - by Linto davis
    I want to get the week number of a particular date , using Zend_Date My local is setted as English(IN) [en_IN], in Opera browser I am using the following code $date = new Zend_Date('22 Mar, 2010', null, Zend_Registry::get('Zend_Locale')); echo $date->get(Zend_Date::WEEK); //output 12, correct But if we give a sunday , it will not work correctly for example $date = new Zend_Date('21 Mar, 2010', null, Zend_Registry::get('Zend_Locale')); echo $date->get(Zend_Date::WEEK); //output 11, not correct it should output 12 What is wrong with this?

    Read the article

  • Determine if a day of week and time fall in a custom weekend period

    - by Y Low
    I've been trying to come up with a method, that given a day of week and time of day, it will return if it falls under a custom weekend period. The weekend period is saved in 4 variables as follows: The day of week when it starts (0-6) The time of day when it starts (0-23) The day of week when it ends (0-6) The time of day when it ends (0-23) Based on these fields, the weekend period can be anything the user selected (even if it is well beyond a regular weekend) I've been banging this one for awhile but to no avail. I'm trying this in delphi but any language will do, as I'm looking for the algorithm and not the implementation.

    Read the article

  • Store the day of the week and time

    - by bsiddiqui
    I have a two part question about storing day(s) of the week and time in a database. I'm using Rails 4.0, ruby 2.0.0, and postgres. I have certain events and those events have a schedule. For the event Skydiving for example, for example, I might have Tuesday and Wednesday and 3 pm. 1) Is there a way for me to store the the record for Tuesday and Wednesday in one row or do should I have two records? 2) What is the best way to store the day and time? Is there a way to store day of week and time (not datetime) or should these be separate columns? If they should be separate, how would you store day of week? I was thinking of storing them as integer values (0 for Sunday, 1 for Monday, etc) since that's how wday method for the Time class does it. Any suggestions would be super helpful. Thanks!

    Read the article

  • PHP - displaying 1 random record for each week

    - by mike
    I want to display 1 random record from a database based on the week. I need to determine if it's a new, and if it is a new week, then select the record and display the new record. I'm thinking I can just use a single day of the week to generate the new record, either way will work. I'm really having a hard time conceptualizing how I'll store the record id and not select a new one when someone visits again the same day or refreshes the page. Any ideas? Let me know if I wasn't clear enough.

    Read the article

  • Fluent NHibernate Mapping and Formulas/DatePart

    - by Alessandro Di Lello
    Hi There, i have a very simple table with a Datetime column and i have this mapping in my domain object. MyDate is the name of the datetime column in the DB. public virtual int Day { get; set; } public virtual int Month { get; set; } public virtual int Year { get; set; } public virtual int Hour { get; set; } public virtual int Minutes { get; set; } public virtual int Seconds { get;set; } public virtual int WeekNo { get; set; } Map(x => x.Day).Formula("DATEPART(day, Datetime)"); Map(x => x.Month).Formula("DATEPART(month, Datetime)"); Map(x => x.Year).Formula("DATEPART(year, Datetime)"); Map(x => x.Hour).Formula("DATEPART(hour, Datetime)"); Map(x => x.Minutes).Formula("DATEPART(minute, Datetime)"); Map(x => x.Seconds).Formula("DATEPART(second, Datetime)"); Map(x => x.WeekNo).Formula("DATEPART(week, Datetime)"); This is working all great .... but Week Datepart. I saw with NHProf the sql generating for a select and here's the problem it's generating all the sql correctly but for week datepart.. this is part of the SQL generated: ....Datepart(day, MyDate) ... ....Datepart(month, MyDate) ... ....Datepart(year, MyDate) ... ....Datepart(hour, MyDate) ... ....Datepart(minute, MyDate) ... ....Datepart(second, MyDate) ... ....Datepart(this_.week, MyDate) ... where this_ is the alias for the table that nhibernate uses. so it's treating the week keyword for the datepart stuff as a column or something like that. To clarify there's no column or properties that is called week. some help ? cheers Alessandro

    Read the article

  • Adaptec 2420SA RAID 1 rebuild 66% after 1 week

    - by moss
    We're running a 500GB RAID 1 on an Adaptec 2420SA - 2x500GB Hitachi Drives. It suddenly crashed and required a rebuild -- was not even booting. It's only at 66% after about a week. Very frustrated. This is the second box with the same card and drives that has had issues with the RAID/drives. Another box had this happen twice. Both machines are Linux boxes. CentOS and Fedora. I dunno if it's the firmware -- which currently needs an update (any help doing this over PXE would be great- I have used UDA to do PXE boots in the past). Anyway, would love to hear about experiences with this card and firmware. I thinking of going google and just using cheap boxes no raid and have server redundancy instead.

    Read the article

  • debian - running unattended-upgrades on a particular day of the week

    - by dastra
    We're running unattended-upgrades on debian squeeze, and would like it to run once a week, only on a Wednesday morning. To attempt this, we have set: APT::Periodic::Unattended-Upgrade "7" in /etc/apt/apt.conf.d/50unattended-upgrades And then touched the /var/lib/apt/periodic/update-stamp to set the timestamp to a Wednesday, for instance: touch -t 201211280000 /var/lib/apt/periodic/update-stamp Running: stamp=$(date --date=$(date -r /var/lib/apt/periodic/update-stamp --iso-8601) +%s 2/dev/null) date -u --date="1970-01-01 $stamp sec GMT" Gives the correct timestamp: Wed Nov 28 00:00:00 UTC 2012 However, unattended-upgrades then seems to ignore this, and run the updates on a Saturday morning. Could anyone enlighten me as to how this parameter works, and how to set up upgrades to run on a Wednesday?

    Read the article

  • Microsoft Outlook: show multi-day appointments as boxes in calendar day and week view

    - by Bernd
    I would like to show appointments spanning several days the same way as appintments within a single day. Single day appointments are shown with a white or colored box, covering the day horizontally. Multi-day appointments are shown in the day/week header and are indicated blue or purple on the left side of a day. This happens even if a multi-day appointment is not an all-day appointment (i.e. checkbox is off) and I have a start and end time. I frequently have a hard time seeing appointment overlaps wenn acceping single day appointments. Therefore I am looking for multi-day appointments shown the same way as single day appointments. I am on Outlook 2003.

    Read the article

  • New Kingson SSD drive fails after 1 week

    - by user35356
    I upgraded the hard disk in my notebook to a 128GB Kingston SSD V100. Everything worked fine for about a week then out of the blue the notebook would not boot up any more. A black dos-like screen was shown with the options to try and boot normally or attempt to repair windows. Neither option would do anything. When I removed the drive and tested it in an external usb case no other computers are able to access the drive either. Is there anything I can try to fix it myself? The drive is partitioned into three drives and when it's connected through an external usb case to another computer I can see the partitions, just can't access anything on them. Does this mean the drive might be recoverable?

    Read the article

  • Rails: find by day of week with timestamp

    - by Sleepycat
    I need to grab the records for same day of the week for the preceeding X days of the week. There must be a better way to do it than this: Transaction.find_by_sql "select * from transactions where EXTRACT(DOW from date) = 1 and organisation_id = 4 order by date desc limit 7" It gets me what I need but is Postgres specific and not very "Rails-y". Date is a timestamp. Anyone got suggestions?

    Read the article

  • TSQL: grouping customer orders by week

    - by fishhead
    I have a table with a collection of orders. The fields are: customerName (text) DateOfOrder (datetime). I would like to show totals of orders per week per customer. I would like to have it arranged for the Friday of each week so that it looks like this: all dates follow mm/dd/yyyy "bobs pizza", 3/5/2010, 10 "the phone co",3/5/2010,5 "bobs pizza", 3/12/2010, 3 "the phone co",3/12/2010,11 Could somebody please show me how to do this? Thanks

    Read the article

  • help translate this week query from Oracle PL/SQL to SQL Server 2008

    - by Sarah Vessels
    I have the following query that runs in my Oracle database and I want to have the equivalent for a SQL Server 2008 database: SELECT TRUNC( /* Midnight Sunday */ NEXT_DAY(SYSDATE, 'SUN') - (7*LEVEL) ) AS week_start, TRUNC( /* 23:59:59 Saturday */ NEXT_DAY(NEXT_DAY(SYSDATE, 'SUN') - (7*LEVEL), 'SAT') + 1 ) - (1/(60*24)) + (59/(60*60*24)) AS week_end FROM DUAL CONNECT BY LEVEL <= 4 /* Get the past 4 weeks */ What the query does is get the start of the week and the end of the week for the last 4 weeks. It generates data like the following: WEEK_START WEEK_END 2010-03-07 00:00:00 2010-03-13 23:59:59 2010-02-28 00:00:00 2010-03-06 23:59:59 ...

    Read the article

  • PHP: Check if it has been one week since timestamp

    - by Rudi
    Hi guys, Let's assume: $time = '2010-05-17 02:49:30' // (retrieved from MySQL TIMESTAMP field) How do I do the following in PHP: 1) Check if it has been more than one week since this time has passed? 2) Assuming "false" on (1), find out how much more time until the one week mark, rounded to days and hours remaining. I know this is pretty straightforward, but it uses a very specific syntax. Having never played with time calculations before, I'd appreciate some guidance. Thanks!

    Read the article

< Previous Page | 8 9 10 11 12 13 14 15 16 17 18 19  | Next Page >