DateTime in C#
How would I display the current time that could be either in 24 hour format or am/pm format depending on windows setting in C#? ...
How would I display the current time that could be either in 24 hour format or am/pm format depending on windows setting in C#? ...
Has anyone found a simple, but effective way to extract date references from text? I've done a fair amount of searching for temporal extraction tools, but there isn't a lot out there. There are a few white papers, but it seems to fall into a subset of the whole semantic web thingy but not given much attention. I'm just looking for s...
Hi, I've had a look through similar queries on here and elsewhere but i still can't seem to resolve my problem. I am trying to see whether a date stored in a mutable dictionary in an array is between two other dates. The piece of code generating the warning is: if ( [[[records objectAtIndex:( i )] objectForKey:@"Date"] compare:userSta...
Hi all, I am selecting the date from dropdownlist. but i am getting this exception "SqlDateTime overflow. Must be between 1/1/1753 12:00:00 AM and 12/31/9999 11:59:59 PM." Here is my code: DateTime dateofjoining = new DateTime(DropDownListDay.SelectedIndex, DropDownListMonth.SelectedIndex, ...
How to insert a NULL or empty value in a mysql date type field (NULL = yes). If I try to insert an empty value it inserts 0000-00-00 but I want to keep it empty or NULL. Thanks for help. UPDATE Please see that I have set default value as NULL `payment_due_on` date DEFAULT NULL, Ok OKies I have got it working now function get_m...
Hey everyone, Before I start coding, I want to come up with a good design first. Basically, I have a database table filled with dates, and users who are associated with those dates (the dates are in sql format). Using PHP I want to, for each user, calculate (count in total) how many weekdays they are associated with, as well as how ma...
I'm dealing with a website where people can subscribe to certain things for virtual money. I need to put the dates at which subscriptions end in the database. My table has a field "expiration" for that, which is a DATE. When the user extends his subscription, I need to add 1 month to this date. However, if the subscription has already e...
I can't see where I'm going wrong with the code below, its probably something obvious but I'm too blind to see it at this stage. I'm passing a date of "01/01/2009" to an instance of calendar. I then try and set the month to 2 for March and the output I see is formatted: 01/01/2009 cal month: 2 cal.set( Calendar.MONTH, mth ); //mth = ...
I want to get yesterdays entries in the database. Any ideas on what query I should run? Its been blowing my mind for the last hour! mysql_query("SELECT id , fullname , address1 , address2 , citytown , postcode , telno , email , property_value , on_market , agent , asking_price , reason , total_secured_debt , price_concession , FROM_UNI...
I would like to add to my c# Visual C# Express (no macros) snippet current date and time tag. How to do it? When I will use intellisense to create code with this snippet I would like to have current date and time put into code. ...
Hi, I am creating a holiday request site and need to find the best way to update users holiday entitlements when the date range includes a bank holiday. Currently when users create a new request with a [START TIME] of say 29th Aug and [End TIME] of 4 September the total number of holidays will be incorrect as it will also include the A...
Is there a way to sort the results by creation date? Example query which must be sortet: SELECT * WHERE {?s ?p ?o} limit 200 ...
I just want to figure out,, How can a batch file (CMD) tell me how many days i'm left from any date...??? Such as: set setdate=24/07/2009 echo The date is now: %date% echo Your set date is: %setdate% echo You're %days% days left from %setdate% Thanks! ...
Hi, I have this SQL query about getting the 5 events today: SELECT n.nid, n.type, n.title, nr.body, nr.teaser, FROM_UNIXTIME(e.event_start) start_date, FROM_UNIXTIME(e.event_end) end_date FROM node n LEFT JOIN event e ON n.nid = e.nid LEFT JOIN node_revisions nr ON nr.nid = e.nid WHERE n.`type` = 'event' AND NOW() BETWEEN FROM_UNIXTIME...
Hi , I need to add automatically current weeks first date into a table and a text box of a vba form. could anyone help if any functions are available ?? ...
Hi all, I've a var example = "05-10-1983" How I can get the "next day" of the string example? I've try to use Date object...but nothing... ...
I would like to know how to get no. of days using getdate() & existing dates in other table, where that table contains multiple records, ie i would like to know the jobs posted 5 days back or 10 days back or 15 days back. I have written the query like declare @q1 datetime; select cdate from jobposting where cdate like (select cdate) se...
Lets say I have a string that represents a date that looks like this: "Wed Jul 08 17:08:48 GMT 2009" So I parse that string into a date object like this: DateFormat formatter = new SimpleDateFormat("EEE MMM dd HH:mm:ss ZZZ yyyy"); Date fromDate = (Date)formatter.parse(fromDateString); That gives me the correct date object. Now I wan...
I'm using Date.wday to get the weekday number, but then how can I create a new Date with just that number (without using Date.commercial)? I only need the date to be next week's. For example, if I have 2 (Tuesday), the new date would be whatever date next tuesday is (2009-07-28). Thanks! ...
Is there a method using either JavaScript or jQuery to determine what day of the week it is? For instance, if the date a user picks in the box is a Sunday, I can alert them. Thanks ...