i have sqlCE DataBase, i have Tdate field (datetime)
i notice that his format is: MM/DD/YYYY
in my C# program i work with date in: DD/MM/YYYY format.
how i can insert to my sqlCE data base my C# format ?
I am trying to count the number of rows whose date has not yet passed so i can get only the current records
I get an error sayng
MySQL error #111 Invalid use of group function
SELECT COUNT(festivalid) FROM festivals WHERE min(datefrom) > now()
i am converting my date to Universal Time using mydate.ToUniversalTime() in vb.net its giving me right time but its giving me time in "5/4/2010 4:30:00 AM" format (in vb.net) but i want it in "Wed, 05 May 2010 05:50:00 GMT" format.. please help me to make it in "Wed, 05 May 2010 05:50:00 GMT" format.
Hello,
is there any ready to go solution within the microsoft framework, regarding conversion of date to day?
For example, i would like to convert this string 21/03/2010 (dd/mm/yyyy) to Sunday
I have a bunch of records with dates formatted as a string such as '04/17/2009'
I want to convert them to a mysql datetime field
I plan to use a foreach loop to read the old date value and insert the newly formatted value into a new field in each record
what would be the best way to convert that string...I thought php might have a way to do it automatically?
thanks
Hello, I want to compare a column value to the current date, using HQL.
I tried
IQuery someQuery = session.CreateQuery(String.Format(
@"Select s.Id
From InventoryProductStateItem s
where s.ValidFrom < current_date()"));
This throws the exception "Incorrect syntax near keyword current_date()"
Can someone help me?
In my form I am using drop down for showing day, month, year. can you help me to validate the date. I have to validate the entered age is greater than 15. also checking leap year
Hi, I need date string using sql statement like..
select getDate()
this will return 2010-06-08 16:31:47.667
but I need in this format 201006081631 = yyyymmddhoursmin
How can I get this?
Thanks
How do I add 2 years to a date in powerbuilder and account for the leap year correctly?
We have a medical license application where the user would like the date to go expire two years. Current license date is 7/10/2010 and expire date should be 7/2/2012 I used relative date and added 729 if not a leap year and 730 if it was but that is messy.
I wish the relativedate function took another parameter to so you could pass in number years.
We have a Netezza table that contains dates stored in a numeric YYYYMMDD format (eg 20090731).
What is the best Netezza syntax to use to convert this into date format?
eg
SELECT somefunction(20090731) as NZDATE
?
Hi all,
I need to make the datepicker show when I click on a link and then send the selected date to a different page through a post call.
T tried to use this code for the link call:
$(".click-on-link").click(function(){
$('#datepicker').datepicker({
changeMonth: true,
changeYear: true,
dateFormat: 'dd/mm/yy',
firstDay: 1
});
});
but it's not working. Any idea?
Thanks!
D <- read.csv("sample1.csv", header = FALSE, sep = ",")
D
V1 V2 V3 V4
1 20100316 109825 352120 239065
2 20100317 108625 352020 239000
3 20100318 109125 352324 241065
D[,1]
[1] 20100316 20100317 20100318
In the above example how do I get the data in D[,1] to be read, and stored as date values:
2010-03-16, 2010-03-17, 2010-03-18 ? I have lots of data files in this format.
TIA,
I have 3 drop down list having Date,Month ,Year.So when Updating I want this 3 Field to be a single Datafield in Sql Database. Iam using Asp.Net 2.0 Version(VB.Net).(Now these 3 Dropdown list values are saved as 3 Datafields in sql Database)
I have been helping someone debug some code where the error message was "Day too big". I know that this springs from localtime and the Y2038 bug (most google results appear to be people dealing with cookies expiring well into the future).
We appear to have 'fixed' the problem by using time to get the current date. However, given that none of our original dates should have hit the 2038 issue I'm sceptical that we've actually fixed the problem ...
Are there other instances that anyone knows of where one would hit "day too big"?
OS is Solaris.
Sample code - the actual code is quite large and the person I'm working with hasn't actually isolated the offending part (which is why I'm worried the 'fix' is not actually a fix). If I can put together something concise which reproduces the issue I will post!
I'm looking for a way to set a selection in a textarea in Internet Explorer. In other browsers, this works just fine:
textarea.selectionStart = start;
textarea.selectionEnd = end;
In IE, I assume I have to use createRange and adjust the selection somehow, but I cannot figure out how.
Extra bonus points for a link to a proper documentation about createRange and associated methods, MSDN isn't helping out much.
What is the easiest way to automatically fill a datetime column in an SQL data table with the date the row was created? Using SQL Server 2005 if that matters.
I'm having an issue with my ASP.NET RangeValidator controls.
I want to allow users to enter a discount amount, and this amount must be negative (< $0.00). I want to verify that the amount entered in a textbox is a negative value, so I have this in my page markup:
<asp:TextBox ID="tbxDiscount" runat="server" />
<asp:RangeValidator ID="rvDiscount" runat="server" ControlToValidate="tbxDiscount"
MinimumValue="0.0" MaximumValue="0.0" EnableClientScript="true"
ErrorMessage="Please enter a negative value for a discount" />
and I attempt to set the MinimumValue dynamically in my code before the page gets rendered - to the negative equivalent of my item price. So if the item is $69, I want to set the minimum value to - $69:
rvDiscount.MinimumValue = (-1.0m * Price).ToString();
Trouble is: I keep getting this error message:
The maximum value 0.0 cannot be less
than the minimum value -69.00 for
rvDiscount
WTF?!?!??! Where I come from, -69 $ IS less than $0 ...... so what's the problem?
And more importantly: what is the solution to the problem??
hi
i try to run this query:
select * from WorkTbl
where ((Tdate = '20100414' AND Ttime = '06:00') and (Tdate <= '20100415' AND Ttime <= '06:00'))
i have this date: 14/04/2010 and time: 14:00
i cant see hem, how to fix the query ?
thank's in advance
This is probably a simple answer. I searched but couldn't find what I was looking for...
If someone in the GMT + 10 time zone inputs a date (e.g: 2010-08-01 23:09:33) which I then convert to a TIMESTAMP (strtotime()), how do I convert that to GMT time?
The following script returns 20 instead of 21!
var d = new Date("2010/03/21");
document.write(d.getDate());
What am I doing wrong? Is this a JavaScript bug?
i have database table like this
+-------+--------------+----------+
| id | ip | date |
+-------+--------------+----------+
| 505 |192.168.100.1 |2010-04-03|
| 252 |192.168.100.5 |2010-03-03|
| 426 |192.168.100.6 |2010-03-03|
| 201 |192.168.100.7 |2010-04-03|
| 211 |192.168.100.10|2010-04-03|
+-------+--------------+----------+
how can i retirive data from this table where month=03 how to write sql to do that .
select * from table where month=03
something like that .
I have html pages and I am parsing those pages with html agility pack.
Now I want to parse some information.In every pages there is trading date(20/02/02) which I want to parse.
Like it will be look like a Trading date : 20/02/02. Now Trading date and date(20/02/02) may be in same column(td) or it can be different column like in first column trading date and in second column 20/02/02 then what should I do ?
I am working on an ASP .net MVC application.
I have a System.DateTime? property say creationDate, which gets its value assigned from controller code. In my javascript I have access to this value, and I wanted to display this value in mm/dd/yyyy format in my grid. But I am not sure on how to convert System.Datetime? of c# to a javscript date or datestring value? Any help would be appreciated.
How can I produce a timestamp to millisecond accuracy from a date or datetime in Python?
There are an overwhelming number of methods and ways of doing this, and I'm wondering which is the most Pythonic way.