Search Results

Search found 12421 results on 497 pages for 'date arithmetic'.

Page 43/497 | < Previous Page | 39 40 41 42 43 44 45 46 47 48 49 50  | Next Page >

  • CDateTimeCtrl - preventing 'focus' change when setting date

    - by WalderFrey
    I'd like to use a CDateTimeCtrl to allow the user to select a non-weekend date. So, if the user increments the day (via a keypress) - and the resulting day is found to fall on a weekend - then the control should skip forward to the following Monday (don't let issues about month changes distract you, it's not relevant). Usually it's not a problem: when I handle the DTN_DATETIMECHANGE notification I can check the new date/time and if it's found to be a weekend then I can call SetTime on the control to update the date. However, if I set the style to DTS_SHOWNONE, this call to SetTime causes the control to shift the input 'focus' (term used loosely) to the 'none' checkbox, e.g. away from the day field. This prevents the user from using keyboard input to continue incrementing the date unless they subsequently use the right arrow key to reset the 'focus', which is just nasty. I would dearly like to prevent this focus shift from occurring. Is it even possible?

    Read the article

  • How to determine the date that Office 2003 was installed

    - by GalleySlave
    Is there any guaranteed way of determining the date that Office 2003 (and .Net Framework v2.0) were installed on a client computer? I am trying to nail down a problem which I think is due to the order that the .Net Framework and Office 2003 were installed in, so I need a way I can get a client to have a look at their machine (preferably the file system) and let me know. It may require admin privileges (or Registry etc) which wouldn't be a problem but not the preferred solution. It appears that the folders under Program Files\Microsoft Office\Office11 have a number with the same date which at first sight appear to be an installation date / time. Likewise in Windows\Microsoft.Net\Framework\v2.0.50727 there are two with the same date, but this seems less certain. I could use WMI with a winmgmts:object and SELECT * FROM Win32_Product, but was wondering if there was a 'telephone' way to do it!

    Read the article

  • SQL server datetime column filter on certain date or range of dates

    - by MicMit
    There is an example for today here http://stackoverflow.com/questions/2583228/get-row-where-datetime-column-today-sql-server-noob I am primarily interested in 2008 only. For today it looked like SELECT (list of fields) FROM dbo.YourTable WHERE dateValue BETWEEN CAST(GETDATE() AS DATE) AND DATEADD(DAY, 1, CAST(GETDATE() AS DATE)) What literal value of date(s) or functions ( I need a format ) should I place there to make it work independent of local settings.

    Read the article

  • JavaScript date suffix formatting

    - by TexasB
    I have done my due diligence in investigating this and not had any success yet. Being rather green with JavaScript I am seeking some help. I am wanting to display the date NOV2012<br> 2<sup>nd</sup><br> 5:00 PM I have everything working (not my script) except being able to get the date suffix to change to st, nd, rd, or th as the case may be. This is what I have: <pre> <abbr title="Month"> <script type="text/javascript"> var d=new Date(); var month=new Array(12); month[0]="Jan"; month[1]="Feb"; month[2]="Mar"; month[3]="Apr"; month[4]="May"; month[5]="Jun"; month[6]="Jul"; month[7]="Aug"; month[8]="Sep"; month[9]="Oct"; month[10]="Nov"; month[11]="Dec"; document.write(month[d.getMonth()]); </script></abbr> <script type="text/javascript"> var d = new Date() document.write(d.getDate()) ordinal : function (number) { var d = number % 10; return (~~ (number % 100 / 10) === 1) ? 'th' : (d === 1) ? 'st' : (d === 2) ? 'nd' : (d === 3) ? 'rd' : 'th'; } }); </script> <sup>%</sup> <abbr><script type="text/javascript"> var d = new Date() document.write(d.getFullYear()) </script></abbr> <sub> <script type="text/javascript"> <!-- var currentTime = new Date() var hours = currentTime.getHours() var minutes = currentTime.getMinutes() if (minutes < 10){ minutes = "0" + minutes } document.write(hours + ":" + minutes + " ") if(hours > 11){ document.write("PM") } else { document.write("AM") } //--> </script> </sub> </pre> I know the issue is with this part: <pre> <script type="text/javascript"> var d = new Date() document.write(d.getDate()) ordinal : function (number) { var d = number % 10; return (~~ (number % 100 / 10) === 1) ? 'th' : (d === 1) ? 'st' : (d === 2) ? 'nd' : (d === 3) ? 'rd' : 'th'; } }); </script> < sup > % < /sup > </pre> but I can't seem to work out the right fix. This is where it is sitting: http://www.bcreativeservices.com/ Thank you as always. B

    Read the article

  • Getting a date value in a postgres table column and check if it's bigger than todays date

    - by Roland
    I have a Postgres table called clients. The name column contains certain values eg. test23233 [987665432,2014-02-18] At the end of the value is a date, I need to compare this date, and return all records where this specific date is younger than today I tried select id,name FROM clients where name ~ '(\d{4}\-\d{1,2}\-\d{1,2})'; but this isn't returning any values. How would I go about to achieve the results I want?

    Read the article

  • Parsing a string to date gives 01/01/0001 00:00:00

    - by kawtousse
    String dateimput=request.getParameter("datepicker"); System.out.printl("datepicker:" +dateimput); DateFormat df = new SimpleDateFormat("MM/dd/yyyy"); Date dt = null; try { dt = df.parse(dateimput); System.out.println("date imput is:" +dt); } catch (ParseException e) { e.printStackTrace(); } *datepicker:04/29/2010 (value I currently selected from datepicker). *the field in database is typed date. 1-date imput is:Thu Apr 29 00:00:00 CEST 2010 and in database level it is inserted like that 01/01/0001 00:00:00

    Read the article

  • How to reformat date in PHP?

    - by Lisa
    I am pulling the dates of various posts from a database. The dates are in the following format: 2009-08-12 Numeric Year - Numeric Month - Numeric Day How can I reformat these dates to something more user friendly like: August 12, 2009 Numeric Month Numeric Date, Numeric Year Assuming that the date gotten from the mysql database is stored in a variable called: $date = $row['date_selected'];

    Read the article

  • Validating a date with symfony using sfValidatorSchema

    - by aaronfalloon
    I'm using the following widget to allow a user to input a date $this->widgetSchema['first_registration'] = new sfWidgetFormDate(array( 'format' => '%month%/%year%', 'years' => range(date('Y', time()) - 15, date('Y', time()) + 15) )); The default format for a date using this widget is %month%/%day%/%year% and so that's what the default validator for this widget checks for. However, I've attempted to alter the validator... $this->validatorSchema['first_registration'] = new sfValidatorDate(array( 'date_format' => '%month%/%year%', 'with_time' => false )); This isn't working and I'm still getting an invalid error. Does anybody know why?

    Read the article

  • MySQL: How to check if a string is a valid DATE, TIME or DATETIME

    - by Svish
    When I try to put a value into a DATE field which is invalid, MySQL seems to use 0000-00-00 instead. Is there a way I can do this "check" without updating a DATE field? And to do it from for example PHP? Like, is there a way I can query the MySQL server and ask "Hey, is this DATE, TIME or DATETIME valid to you?" Or is there maybe an even better way of doing it?

    Read the article

  • GROUP BY and SUM distinct date across 2 tables

    - by kenitech
    I'm not sure if this is possible in one mysql query so I might just combine the results via php. I have 2 tables: 'users' and 'billing' I'm trying to group summed activity for every date that is available in these two tables. 'users' is not historical data but 'billing' contains a record for each transaction. In this example I am showing a user's status which I'd like to sum for created date and deposit amounts that I would also like to sum by created date. I realize there is a bit of a disconnect between the data but I'd like to some all of it together and display it as seen below. This will show me an overview of all of the users by when they were created and what the current statuses are next to total transactions. I've tried UNION as well as LEFT JOIN but I can't seem to get either to work. Union example is pretty close but doesn't combine the dates into one row. ( SELECT created, SUM(status) as totalActive, NULL as totalDeposit FROM users GROUP BY created ) UNION ( SELECT created, NULL as totalActive, SUM(transactionAmount) as totalDeposit FROM billing GROUP BY created ) I've also tried using a date lookup table and joining on the dates but the SUM values are being added multiple times. note: I don't care about the userIds at all but have it in here for the example. users table (where status of '1' denotes "active") (one record for each user) created | userId | status 2010-03-01 | 10 | 0 2010-03-01 | 11 | 1 2010-03-01 | 12 | 1 2010-03-10 | 13 | 0 2010-03-12 | 14 | 1 2010-03-12 | 15 | 1 2010-03-13 | 16 | 0 2010-03-15 | 17 | 1 billing table (record created for every instance of a billing "transaction" created | userId | transactionAmount 2010-03-01 | 10 | 50 2010-03-01 | 18 | 50 2010-03-01 | 19 | 100 2010-03-10 | 89 | 55 2010-03-15 | 16 | 50 2010-03-15 | 12 | 90 2010-03-22 | 99 | 150 desired result: created | sumStatusActive | sumStatusInactive | sumTransactions 2010-03-01 | 2 | 1 | 200 2010-03-10 | 0 | 1 | 55 2010-03-12 | 2 | 0 | 0 2010-03-13 | 0 | 0 | 0 2010-03-15 | 1 | 0 | 140 2010-03-22 | 0 | 0 | 150 Table dump: CREATE TABLE IF NOT EXISTS `users` ( `created` date NOT NULL, `userId` int(11) NOT NULL, `status` smallint(6) NOT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1; INSERT INTO `users` (`created`, `userId`, `status`) VALUES ('2010-03-01', 10, 0), ('2010-03-01', 11, 1), ('2010-03-01', 12, 1), ('2010-03-10', 13, 0), ('2010-03-12', 14, 1), ('2010-03-12', 15, 1), ('2010-03-13', 16, 0), ('2010-03-15', 17, 1); CREATE TABLE IF NOT EXISTS `billing` ( `created` date NOT NULL, `userId` int(11) NOT NULL, `transactionAmount` int(11) NOT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1; INSERT INTO `billing` (`created`, `userId`, `transactionAmount`) VALUES ('2010-03-01', 10, 50), ('2010-03-01', 18, 50), ('2010-03-01', 19, 100), ('2010-03-10', 89, 55), ('2010-03-15', 16, 50), ('2010-03-15', 12, 90), ('2010-03-22', 99, 150);

    Read the article

  • Inserting a Date and Time value to a MySql from PHP

    - by DomingoSL
    Hello i want to send to a MySQL data base a date and time in a format compatible with the mysql DateTime format, wich is: 0000-00-00 00:00:00 ... Im using this code who brings the date and time from a PHP command: $insert = "INSERT INTO sms (ref, texto, fecha) VALUES ('".$_POST['usuario']."', '".$_POST['sms']."', '".date(DATE_ATOM, mktime(0, 0, 0, 7, 1, 2000))."')"; $add_member = mysql_query($insert); I really want to do this but with a MySQL command, i mean, using the Date and Time from the mysql server. Thanks

    Read the article

  • how store date in myqsl database?

    - by Syom
    i have date in dd/mm/yyyy format. how can i store it in databse, if i fant to do some operations on them after? for example i must find out the rows, where date > something what type i must set to date field? thanks

    Read the article

  • update SMS body, but not Date

    - by everinsearch
    I'm trying to update body of all sms on Android device with getContentResolver().update(Uri.parse("content://sms"), values..... query but after request done, also updates message creation/received time. How i can update message but leave old message date? I have tried send to update query ContentValues values = sms values oject; values.put("body", updatedBody); values.put("date", oldValues.getAsString("date")); but it does not help.

    Read the article

  • Use date time control that blackberry device uses

    - by SWATI
    In Blackberry device if we go to Options --- Date/Time ----Use Network Time -- No Now when we select date or time a very stylish selector opens up that enables user to set date and time. Can i use such control in my app. I saw such in Storm 9530 Any idea please help!!!!!!!!!!!!!!!!

    Read the article

  • [Zend_Framework] Group by date with Zend_Db

    - by rasouza
    I have several entries in a table with name and date. I'd like to fetchAll with Zend_Db then get a grouped-by-date array. It happens that if I use group(), Zend_Db_Select method, it excludes some entries and I need them all. Actually, what I'm trying to do is to render several tables, one for each different date, with data inside. I have no ideia. How do I do that? Thx in advance

    Read the article

  • how store date in mysql database?

    - by Syom
    i have date in dd/mm/yyyy format. how can i store it in databse, if i fant to do some operations on them after? for example i must find out the rows, where date > something what type i must set to date field? thanks

    Read the article

  • Getting number of days between [NSDate date] and string @"2010-11-12"

    - by grobald
    Hello i have a question. in short: i need a function which receives [NSDate date] and string @"2010-11-12" and returns the amount of days between those two dates. more explanation: I need to store a date from a server in the format @"2010-11-12" in my NSUserdefaults. The meaning of this date is the expireDate of a feature in an iPhone App. Everytime i press on a button for this feature i need to check if the difference in days between the current time-[NSDate date] and @"2010-11-12" is greater than 0. That means tahat the feature is disabled. its making me crazy mabey its to dead simple.

    Read the article

  • Database schema last updated date.

    - by pencilslate
    How to find out the last date and timestamp of schema updation in SQL Server database. I could locate the database created and last back up date from properties. But, couldn't find the last schema updated date. Is there a way to find this out?

    Read the article

  • Send JSON date to WCF service

    - by user1394569
    I want to post json object to my WCF service My only problem is his date property. I get the date from an jquery datepicker and i want to get it in my service as c# datetime. My service: namespace Employee { [ServiceContract] public interface IService1 { [OperationContract] [WebInvoke(Method = "POST", RequestFormat = WebMessageFormat.Json, ResponseFormat = WebMessageFormat.Json, BodyStyle = WebMessageBodyStyle.Wrapped)] bool UpdateEmployee(Employee Employee); } } And this is Employee: [DataContract] public class Employee { [DataMember] public string Name { get; set; } [DataMember] public string Department { get; set; } [DataMember] public int Salary { get; set; } [DataMember] public DateTime Hired { get; set; } } All the other properties work fine. I just need to convert my date string to json date.

    Read the article

  • The date is always ignored

    - by TheLearner
    I cannot understand why the date is never set in the title - it's always ignored and if I swap around the date and the title, then the title is ignored! -(id)initWithCoordinate:(CLLocationCoordinate2D)c title:(NSString *)t { [super init]; coordinate = c; NSDate *today = [NSDate date]; [self setTitle:(@"%@%@", [today description], t)]; //[today release]; return self; }

    Read the article

  • 03/20/11 11:24 AM(MONTH/DATE/YEAR HOUR:MIN)

    - by The deals dealer
    I am using the below code: NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init]; [dateFormatter setDateStyle:NSDateFormatterFullStyle]; NSDate *today=[NSDate date]; NSString *string = [dateFormatter stringFromDate:today]; NSLog(@"%@",string); [dateFormatter release]; This will not give me this format 03/20/11 11:24 AM(MONTH/DATE/YEAR HOUR:MIN), if i convert system date and time so the converted string should have such type of information 03/20/11 11:24 AM(MONTH/DATE/YEAR HOUR:MIN).? What should i do?

    Read the article

  • [MySQL Query] How to limit date?

    - by rasouza
    I'd like to select all entries from a table where date is the last one and only those ones. For example: today is May 16th, the last entries I have from my table is dated from May 15th, but I have older ones (May 14th, May13th, etc). I'd like to select only the dated from May 15th, but it's not this specific date, I need to select every entry dated from the last date I have in my database. How to? Thx in advance

    Read the article

< Previous Page | 39 40 41 42 43 44 45 46 47 48 49 50  | Next Page >