Hi, I'm retrieving a date from a MySQL database that shows up like this: '2010-03-09 09:11:30'
How can I change the date to '2010-03-09 00:00:00'? I'm using PHP to perform the query. Thanks!
im having a combo box in which i have to display dates from database...user have to select a date from the combo box to proceed further...but im not able to make the user aware of selecting the item from the combo box first to proceed further...what is the process so that a user can get a message if he has not selected the date from the combo..
For example this what I am trying to do,
def method_a(condition, params={}, &block)
if condition
method_b(params, &block)
else
yield
end
end
and I am trying to call the method like this,
method_a(#{@date > Date.today}, {:param1 => 'value1', :param2 => 'value2'}) do
end
The result is the condition is always evaluated to true. How do I make it work?
Hi,
I am making a simulator and have written lots of files and headers. The problem is whenever I include a file I give the relative path of the particular file. For example a typical code in my application would begin like
#ifndef AI_H
#define AI_H
#include <cstdlib>
#include "../world/world.h"
#include "pathPlan.h"
#include "skills/tryskill.h"
#include "../info/condition.h"
#include "dataStructures/destination.h"
#include "../params/gamePlay.h"
#include "../modules/controlModule.h"
class ai
{
public:
etc etc
I want to avoid using the relative paths. For example I want to directly include "tryskill.h" and "destination.h" without giving the absolute paths. That way I wont need to bother if I change the location of any particular file. I am using Ubuntu 9.10. Any help would be highly appreciated.
Hi friends, My problem is, i am using a Javascript calender in my datagrid in asp.net and wants to make update the date based on the selection on the calender's date while editing, which is not happening. Can any one help me to solve this problem. Code is as follows
<%#Container.DataItem("EventDate")%
<%--' Width="80"/ --%
'
I have a query regarding my report, the report format is as under
**Date** **Received** **Closed** **Pending**
12/01/10 1000 900 100
12/02/10 2000 1000 1000
12/03/10 1500 1300 200
The above report shows the Help Desk tickets Received, Closed, Pending Count as date wise.
How can I create a dynamic SQL query to show above result?
Received Tickets is calculated on SubmitedDate
Closed Tickets is calculated on ClosedDate with status "Closed"
same for Pending Tickets whose status is "Pending".
Please provide me the idea or some sample SQL queries.
I have an SQL query that has an alias in the SELECT statement
SELECT
CONCAT(YEAR(r.Date),_utf8'-',_utf8'Q',QUARTER(r.Date)) AS 'QuarterYear'
Later, I want to refer to this in my group by statement.
I'm a little confused...should I wrap this with backticks, single quote or just leave it unwrapped int he group by
GROUP BY
`QuarterYear `
or should I do this?:
GROUP BY
'QuarterYear'
or just this?:
GROUP BY
QuarterYear
Hi,
i would like to set the date format of all the dates in my web application in a central location.
i mean if the website is opened in USA it will have a format such as
3/19/2010 (March/19/2010)
while in Italy will be
19/3/2010 (19/March/2010)
i am no really concerned with how to locate the users but indeed on how to set the different date format for the whole application in one single location in c#.NET
thanks
Call me pedantic but is there a more elegant way to combine all those checks?
SELECT * FROM [TABLE1]
WHERE [path] = 'RECEIVE'
AND [src_ip] NOT LIKE '10.48.20.10'
AND [src_ip] NOT LIKE '0.%'
AND [src_ip] NOT LIKE '127.%'
ORDER BY [date],[time] DESC;
To something like this:
SELECT * FROM [TABLE1]
WHERE [path] = 'RECEIVE'
AND [src_ip] NOT LIKE IN ('10.48.20.10','0.%','127.%', .... )
ORDER BY [date],[time] DESC;
Hi there,
I am taking credit card details and I am taking the expiration date in two form field, one for the expiration month and one for the expiration year, I am wanting to store the expiration date as timestamp. Will strtotime("05/2010") create a time stamp or do I need to pass a day as well or is there an alternative?
Thanks
Having a nightmare at the moment and just can't see why it isn't working
I have a value in the form H:i (ie 10:00, 13:30) etc called $time
What I want to do is create two new values, $startTime which is 30 mins before $time and $endTime which is 30 mins after $time
I have tried the following but just doesn't seem to want to work
$startTime = date("H:i",strtotime('-30 minutes',$time));
$endTime = date("H:i",strtotime('+30 minutes',$time));
If I pass through 10:00 as $time and echo out both $startTime and $endTime I get:
$startTime = 00:30
$startTime = 01:30
Hi,
given a plain text file, how can I do, using bash, awk, sed, etc, to, at the line number NLINE, add the string STR, just n spaces after the end of the line?
So, for instance, if this is the line NLINE:
date march 13th
for 5 spaces, we get
date march 13th STR
and one gets the modification in a new file.
Thanks
hello,
<input type="text" id="Date-<%=Model.ID%>" /><%=Html.EditorFor(model => model.Date)%>
if I use this I am getting two input boxes on front end?
Can any body help me out.. how to get only one textbox,..
thanks
is there any trick to run a Webservice automatically to check some date specific and performs some operations on particular date. like sending birthday email's and so on ?
Python has pretty good date parsing but is the only way to recognize a datetime such as "Today 3:20 PM" or "Yesterday 11:06 AM" by creating a new date today and doing subtractions?
i have two shell scripts:
script1.sh
echo "date : DATE"
exit 0;
script2.sh
./scripts1.sh
if [ $? -eq 0 ]; then
reboot;
else
echo "Failed"
fi
What should be the result. Ideally it should have been "reboot" , however on some execution i got the "failed" message too. Can anyone explain why this happens?
Hi,
I am making a simulator and have written lots of files and headers. The problem is whenever I include a file I give the relative path of the particular file. For example a typical code in my application would begin like
ifndef AI_H
define AI_H
include
include "../world/world.h"
include "pathPlan.h"
include "skills/tryskill.h"
include "../info/condition.h"
include "dataStructures/destination.h"
include "../params/gamePlay.h"
include "../modules/controlModule.h"
class ai
{
public:
etc etc
I want to avoid using the relative paths. For example I want to directly include "tryskill.h" and "destination.h" without giving the absolute paths. That way I wont need to bother if I change the location of any particular file. I am using Ubuntu 9.10. Any help would be highly appreciated.
I have simple template that's html mostly and then pulls some stuff out of SQL via PHP and I want to include this template in three different spots of another php file. What is the best way to do this? Can I include it and then print the contents?
Example of template:
Price: <?php echo $price ?>
and, for example, I have another php file that will show the template file only if the date is more than two days after a date in SQL.
I have this Calender Control I am using..user can select any date from the calender.. I need to validate the dates like Saturday and Sundays and 1/1 and 1/25.. if they select these days I need to show them Popup message not valid date?
can anybody help me out..
thanks
Hello, is there a good regex expression that would be able to compare two dates
like 3/27/2010 to 3/8/2010 to tell if the first date is greater then the second date?
I'd like to compare using javascript
I am new to iphone development.I am parsing a XML URL and display the title ,date and summary in a table view.I noticed some of the date were very old like "Wed, 31 Dec 1969 19:00:00 -0500" ,So i don't want to display the dates which are 1 year older than the current year.How to do that? I used the sample code from this site for parsing and display the details.Please help me out.Thanks.
How do I do something like the following
SELECT ADDDATE(t_invoice.last_bill_date, INTERVAL t_invoice.interval t_invoice.interval_unit)
FROM t_invoice
...where the column t_invoice.last_bill_date is a date, t_invoice.interval is an integer and t_invoice.interval_unit is a string.
Basically, I want to determine a person's next bill date based on his desired billing frequency. Is there a better way to achieve this?
I have a table with entries which has a DATE field. Each entry has a distinct date.
I'd like to select all the entries from the last month. How?
I tried SELECT * FROM registries WHERE reg_date = DATE_FORMAT(MAX(reg_date), "%m") without success
thx
Hello.
Im writing app in haskell and I would like to know that is the best way to check if users input is ok for example is it int when Im asking for int or if its date when asking for well formed date ?
Thanks for help