Hello again,
I have a C# application over MySql, using MySQL Connector; I'm trying to make a
DataReader request, the query executes fine, however, when trying to access a DateTime field, i'm getting MySqlConversionException {"Unable to convert MySQL date/time value to System.DateTime"}
this is the prototype
if (dr != null && !dr.Read...
I have a web application that I am working on(ASP.NET 2.0 & C#). In it, I have a gridview that gets data from an Oracle Database. Some of the data that I need to display is dates. But when the dates in my gridview show like this:
2009-04-02 00:00:00
I'd prefer they show without the time. I'm using the codebehind to get the data, s...
I'm sure I'm not the first person to need to do this, so I'm looking for the best way.
I've got a set of radio buttons with choices such as
This Year
Last Year
This Month
Last Month
This Week
Last Week
and I need to produce the proper relative date range from the current date (DateTime.Now).
For example if Last Year was selected a...
I want to perform this date check:
The date entered by the user should not be less than 12 months ago from the current date, e.g.
if date_value > '03-apr-2009'
How do I write .NET code to do this?
...
I am confused while using php to handle date/time.
What i am trying to do is this. When a user visits my page i am asking his timezone and then displaying the 'day of week' in his timezone.
I dont want wan to use browser's day.
I want to do this calculation in php.
This is how i am trying to achieve it.
I use
1. The timezone entered...
Hi i need to wirte sql query in such a way that it will retrive the date in the following format
dd MM yyyy HH mm ss AM(or PM)
eg
31 12 2009 12 45 06 AN
...
Hello,
I need Week-Start-Date and Week-End-Date for particular Week number in a year (vb.net or SQL Server)
For example, if weeknumber=1 and year 2009, I should get:
StartDate=1/1/2009
EndDate=1/3/2009
if weeknumber=2 and year 2009, then:
StartDate=1/4/2009
EndDate=1/10/2009
Actually I got week number by using datepart(wk, Date) in...
What is the best way to write unit test for code which gets current time? For example some object might be created only at business days, other objects take into account current time when checking permissions to execute some actions, etc.
I guess that I should mock up the Date.today and and Time.now. Is this right approach?
Update: Bot...
What is the optimal query to obtain all the records for one specific day?
In my Weather model, 'timestamp' is a standard DateTimeField.
I'm currently using
start = datetime.datetime(2009, 1, 31)
end = start + datetime.timedelta(hours=23, minutes=59, seconds=59)
Weather.objects.filter(timestamp__range=(start, end))
but wonder if there...
I have the following know pair of hex values and dates:
7D 92 D2 5C = 26/03/2009 - 09:28
7D 92 DA CC = 27/03/2009 - 11:12
7D 92 E3 56 = 28/03/2009 - 13:22
7D 92 EC 4F = 29/03/2009 - 17:15
7D 92 F3 16 = 30/03/2009 - 12:22
7D 92 FB 1A = 31/03/2009 - 12:26
7D 93 0B 01 = 01/04/2009 - 12:01
7D 93 12 88 = 02/04/2009 - 10:08
7D 93 1A 30 = 03/...
My project requires I use VB (5 or 6)* to store a date in an SQL Server database. The SQL datetime type includes the time, which I don't want. I'm also aware that VB's representation of a date doesn't mirror that of SQL Server.
So, how can I store a date held in VB's date type in the SQL database, as the datetime at midnight on that dat...
Hi,
I need to perform some date operations in ASP.net using C#.
The date i would enter should be of format 'Jul-05' (mmm-yy Format and type-string)...
how can i check with this????
Or how can i validate this with whatever user is entering as a string???
After validating that, i need to compare tht with a value in Database(say a colu...
Solaris 10 doesn't seem to like me a lot.
I am trying to run a simple script to accept date and return epoch of that date:
#!/usr/bin/perl -w
use strict;
use Time::ParseDate;
my $date1 = "Mon Mar 27 05:54:08 CDT 2009";
#Convert to seconds since start of epoch
my $time1 = parsedate($date1);
print $time1;
Works perfectly fine on RHEL ...
Has anyone successfully bound 2 textboxes to one DateTime property using the model binding in MVC, I tried Scott's method http://www.hanselman.com/blog/SplittingDateTimeUnitTestingASPNETMVCCustomModelBinders.aspx but was dissatisfied as this stops the HTML fields and Model properties having the same name (so the validation could not set ...
How do I convert from excel serial date to a .NET date time?
For example 39938 is 05/05/2009.
...
Hi,
I'm parsing an RSS feed which has the time and date as UTC, I need to convert this into a unix timestamp. Is there a simple way to do this?
...
I have an Event table that specifies a date range with start_date and end_date fields. I have another date range, specified in code, that defines the current week as 'week_start' and 'week_end'.
I'd like to query all Events for the week. The cases seem to be:
Event begins and ends within the week
Event begins before the week, but en...
i have a date in this format
May 30 2006 12:00AM
is there a equivalent of strtotime() in mysql that will let me convert this to a mysql date?
...
I have a form that contains one date element and 3 time elements. This is because 3 time events will occur on one date, and I don't want the user to have to input that date 3 times.
On the server side, I would like to combine the one date with the 3 times to get 3 datetime objects. I was thinking I could just do something like:
time_...
Hello group, I am trying to create a WHERE clause that says
WHERE column_1 = TRIM(LEADING '20' FROM(DATEPART(year, GETDATE())))
Basically column_1 contains the fiscal year but the fiscal year is in the database as 8 or 9 not 2008 or 2009.
So I need to figure a way to trim off at least the '20' so that the query will run correctly.....