Search Results

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

Page 34/497 | < Previous Page | 30 31 32 33 34 35 36 37 38 39 40 41  | Next Page >

  • DateTime group by date or hours

    - by nCdy
    01.02.2010 0:00:00 - 01.02.2010 anytime 01.02.2010 0:00:00 - 01.02.2010 0:any minutes and seconds so here is my date : DateTime x; it's 01.02.2010 0:00:00 as a string x.Date.ToString() here I compare date DatarowsForOneDay = dt.Select("DailyRecTime= '" + x.ToString() + "'"); So how can I group by date + Hours without care about minutes and seconds.

    Read the article

  • SQL Reporting Services 2005 - Date field based on a user entered date?

    - by Pierce
    Hi, I have a report in report services 2005 that has two date fields. The problem is that if users run this for a large section of time it uses too much resources on our server. It is possible to only allow the end user to enter the start date and then the end date be auto populated/derived from this field (for example they enter the 1st of a month and this automatically change the end date to the last of a month.)

    Read the article

  • date in future for Rails

    - by Adnan
    Hello, I am trying to make a validation that will validate that the entered date is in future and that the selected date is in the next 7 days. In order to validate if the date is in future I use; valid_until.future? and this one works fine, but to make a validation to check if the date selected is withing 7 days from now?

    Read the article

  • BlackBerry:Built-in Date Picker API?

    - by user187532
    Hi All, In my application screen, i am having a field, where user can to choose his DateOfBirth. I want to popup any built-in "Date" calendar or some built-in Date picker to user, so that it will look professional. As i'm new to this development, i wanted to know there is any code sample available to popoup the built-in Date Picker? Note: I also want to store the selectable Date by user after selecting it in my existing persistent storage. Thank you for your suggestions.

    Read the article

  • OpenCV multiply scalar and a Matrix

    - by jarjarbinks
    Hi, I am trying to find the easiest way to add, subtract a scalar value with a opencv 2.0 cv::Mat class. Most of the existing function allows only matrix-matrix and matrix-scalar operations. I am looking for a scalar-matrix operations. I am doing it currently by creating a temporary matrix with the same scalar value and doing required arithmetic operation. Example below.. Mat M(Size(100,100), CV_8U); Mat temp = Mat::ones(100, 100, CV_8U)*255; M = temp-M; But I think there should be better/easier ways to do it. Any suggestions ?

    Read the article

  • Multiplying char and int together in C

    - by teehoo
    Today I found the following: #include <stdio.h> int main(){ char x = 255; int z = ((int)x)*2; printf("%d\n", z); //prints -2 return 0; } So basically I'm getting an overflow because the size limit is determined by the operands on the right side of the = sign?? Why doesn't casting it to int before multiplying work? In this case I'm using a char and int, but if I use "long" and "long long int" (c99), then I get similar behaviour. Is it generally advised against doing arithmetic with operands of different sizes?

    Read the article

  • Is there a calculator with LaTeX-syntax?

    - by Jørgen Fogh
    When I write math in LaTeX I often need to perform simple arithmetic on numbers in my LaTeX source, like 515.1544 + 454 = ???. I usually copy-paste the LaTeX code into Google to get the result, but I still have to manually change the syntax, e.g. \frac{154,7}{25} - (289 - \frac{1337}{42}) must be changed to 154,7/25 - (289 - 1337/42) It seems trivial to write a program to do this for the most commonly used operations. Is there a calculator which understand this syntax? EDIT: I know that doing this perfectly is impossible (because of the halting problem). Doing it for the simple cases I need is trivial. \frac, \cdot, \sqrt and a few other tags would do the trick. The program could just return an error for cases it does not understand.

    Read the article

  • Fastest way to calculate an X-bit bitmask?

    - by Virtlink
    I have been trying to solve this problem for a while, but couldn't with just integer arithmetic and bitwise operators. However, I think its possible and it should be fairly easy. What am I missing? The problem: to get an integer value of arbitrary length (this is not relevant to the problem) with it's X least significant bits sets to 1 and the rest to 0. For example, given the number 31, I need to get an integer value which equals 0x7FFFFFFF (31 least significant bits are 1 and the rest zeros). Of course, using a loop OR-ing a shifted 1 to an integer X times will do the job. But that's not the solution I'm looking for. It should be more in the direction of (X << Y - 1), thus using no loops.

    Read the article

  • Making sure unsigned int/long always execute in checked context in C#

    - by theburningmonk
    Has anyone found it strange that the default context for uint and ulong is unchecked rather than checked considering that they are meant to represent values that can never be negative? So if some code is trying to violate that constraint it seems to me the natural and preferred behaviour would be to throw an exception rather than returning the max value instead (which can easily leave important pieces of data in an invalid state and impossible to revert..). Is there an existing attribute which can be applied to either class/assembly so that it always performs arithmetic operations in a checked context? I was thinking of writing one myself (as an aspect using PostSharp) but would be great if there's one already. Many thanks,

    Read the article

  • SQL Convert Nvarchar(255) to DateTime problem

    - by steven
    Hi, I'm using SQL server 2008. I have 2 Tables: Table 1 and Table 2. Table 1 has 1 column called: OldDate which is nvarchar(255), null Table 2 has 1 column called: NewDate which is datetime, not null Example data in Table 1: 26/07/03 NULL NULL 23/07/2003 7/26/2003 NULL 28/07/03 When i try CAST(OldDate as datetime) I get this error: Arithmetic overflow error converting expression to data type datetime. I need to insert OldDate into NewDate with no errors. I can't skip some rows. Anyhelp would be appreciated.

    Read the article

  • Is it possible to pass arithmatic operators to a method in java?

    - by user349611
    Right now I'm going to have to write a method that looks like this: public String Calculate(String Operator, Double Operand1, Double Operand2) { if (Operator.equals("+")) { return String.valueOf(Operand1 + Operand2); } else if (Operator.equals("-")) { return String.valueOf(Operand1 - Operand2); } else if (Operator.equals("*")) { return String.valueOf(Operand1 * Operand2); } else { return "error..."; } } It would be nice if I could write the code more like this: public String Calculate(String Operator, Double Operand1, Double Operand2) { return String.valueOf(Operand1 Operator Operand2); } So Operator would replace the Arithmetic Operators (+, -, *, /...) Does anyone know if something like this is possible in java?

    Read the article

  • Java Days & Bookings

    - by sys_debug
    Ok this is an extension of a question I asked about earlier yet this is the next step that is unclear to me. Everything else will be ready and this part is driving me mad! some members provided great help and I already made progress with that info, but this is just another obstacle. I am creating a booking object (as was suggested) that will have a start date and end date. each booking will also have a number of seats associated with it (that I require to reserve). The total available number of seats any given day 46 (as the total capacity of the hall is 46 seats). so in assumption that I have a booking to be made in the system, and start date is 1st jan and end date is 10th jan. The question is how can I check the remaining seats in all those days between the range to see if requested number could be hosted or not? and then when the second booking is made, it will have to see that the days in this range already have less than 46 and decrement further if possible to host the reservation. one of the members, and I appreciate his effort, gladly contributed a method to compare if this booking is after or before the existing bookings. The code provided is here: public boolean overlapsWithExisting(Booking booking) { final Date early = booking.getStart(); final Date late = booking.getEnd(); for(Booking existing : existingBookings) { if(!(early.isAfter(existing.getEnd() || late.isBefore(existing.getStart())) return true; } return false; } I just want to know how to associate 46 with each day and keep record of days that are decremented by bookings. Thanks and reallllllly appreciated :D

    Read the article

  • Sysprep and Capture task sequence failing using MDT 2010

    - by Nic Young
    I have created a Windows Deployment Services server in Windows 2008 R2. When I originally set it up I was able to successfully use MDT 2010 to create my boot images as well as creating task sequences that would sysprep and capture, and deploy my custom .wim files. Everything was working perfectly. About a month later I boot up my Windows 7 x86 image and run Windows updates to keep my image up to date. I then go and run my sysprep and capture task sequence and I get the following errors: I searched online for the cause of this error message and it just seems to be a generic permission denied type of error message. I then decided to completely rebuild my VM image from scratch and try again. I am still getting the same error messages as before. The following is what I have tried troubleshooting this issue: Troubleshooting: I have ensured that that UAC and the firewall is turned completely off when trying to capture the image. I have tried recreating the task sequence and making sure that the deployment share is updated. I have ensured that the local Administrator account is enabled and has the same password as specified in the task sequence. I have tried joining the computer to the domain and running the task sequence and I get a different error: I have attempted to run the script from the command prompt with "Run as Administrator" and I still receive the same errors above. For testing purposes I have ensured that Everyone has read/write access to my deployment share. I have spent days on trying to resolve this to no avail. Any ideas? EDIT: Below is the log info from C:\Windows\Deploymentlogs\BDD.log as requested. <![LOG[LTI Windows PE applied successfully]LOG]!><time="11:48:34.000+000" date="07-25-2012" component="LTIApply" context="" type="1" thread="" file="LTIApply"> <![LOG[LTIApply processing completed successfully.]LOG]!><time="11:48:34.000+000" date="07-25-2012" component="LTIApply" context="" type="1" thread="" file="LTIApply"> <![LOG[Microsoft Deployment Toolkit version: 6.0.2223.0]LOG]!><time="11:48:35.000+000" date="07-25-2012" component="ZTIDrivers" context="" type="1" thread="" file="ZTIDrivers"> <![LOG[The task sequencer log is located at C:\Users\nicy\AppData\Local\Temp\SMSTSLog\SMSTS.LOG. For task sequence failures, please consult this log.]LOG]!><time="11:48:35.000+000" date="07-25-2012" component="ZTIDrivers" context="" type="1" thread="" file="ZTIDrivers"> <![LOG[Processing drivers for an X86 operating system.]LOG]!><time="11:48:35.000+000" date="07-25-2012" component="ZTIDrivers" context="" type="1" thread="" file="ZTIDrivers"> <![LOG[TargetOS is the current SystemDrive]LOG]!><time="11:48:35.000+000" date="07-25-2012" component="ZTIDrivers" context="" type="1" thread="" file="ZTIDrivers"> <![LOG[Property DriverCleanup is now = DONE]LOG]!><time="11:48:35.000+000" date="07-25-2012" component="ZTIDrivers" context="" type="1" thread="" file="ZTIDrivers"> <![LOG[Compare Image processor Type with Original [X86] = [X86].]LOG]!><time="11:48:35.000+000" date="07-25-2012" component="ZTIDrivers" context="" type="1" thread="" file="ZTIDrivers"> <![LOG[Prepare machine for Sysprep.]LOG]!><time="11:48:35.000+000" date="07-25-2012" component="ZTIDrivers" context="" type="1" thread="" file="ZTIDrivers"> <![LOG[No driver actions can be taken for OS Images installed from *.wim files.]LOG]!><time="11:48:35.000+000" date="07-25-2012" component="ZTIDrivers" context="" type="1" thread="" file="ZTIDrivers"> <![LOG[ZTIDrivers processing completed successfully.]LOG]!><time="11:48:35.000+000" date="07-25-2012" component="ZTIDrivers" context="" type="1" thread="" file="ZTIDrivers"> <![LOG[Command completed, return code = -2147467259]LOG]!><time="11:48:35.000+000" date="07-25-2012" component="LiteTouch" context="" type="1" thread="" file="LiteTouch"> <![LOG[Litetouch deployment failed, Return Code = -2147467259 0x80004005]LOG]!><time="11:48:35.000+000" date="07-25-2012" component="LiteTouch" context="" type="3" thread="" file="LiteTouch"> <![LOG[For more information, consult the task sequencer log ...\SMSTS.LOG.]LOG]!><time="11:48:35.000+000" date="07-25-2012" component="LiteTouch" context="" type="1" thread="" file="LiteTouch"> <![LOG[Property RetVal is now = -2147467259]LOG]!><time="11:48:35.000+000" date="07-25-2012" component="LiteTouch" context="" type="1" thread="" file="LiteTouch"> <![LOG[Unable to copy log to the network as no SLShare value was specified.]LOG]!><time="11:48:35.000+000" date="07-25-2012" component="LiteTouch" context="" type="1" thread="" file="LiteTouch"> <![LOG[CleanStartItems Complete]LOG]!><time="11:48:35.000+000" date="07-25-2012" component="LiteTouch" context="" type="1" thread="" file="LiteTouch"> <![LOG[Unregistering TSCore.dll.]LOG]!><time="11:48:35.000+000" date="07-25-2012" component="LiteTouch" context="" type="1" thread="" file="LiteTouch"> <![LOG[About to run command: wscript.exe "\\server\deploymentshare$\Scripts\LTICleanup.wsf"]LOG]!><time="11:48:35.000+000" date="07-25-2012" component="LiteTouch" context="" type="1" thread="" file="LiteTouch"> <![LOG[Microsoft Deployment Toolkit version: 6.0.2223.0]LOG]!><time="11:48:36.000+000" date="07-25-2012" component="LTICleanup" context="" type="1" thread="" file="LTICleanup"> <![LOG[Removing AutoAdminLogon registry entries]LOG]!><time="11:48:36.000+000" date="07-25-2012" component="LTICleanup" context="" type="1" thread="" file="LTICleanup"> <![LOG[VSSMaxSize not specified using 5% of volume.]LOG]!><time="11:48:36.000+000" date="07-25-2012" component="LTICleanup" context="" type="1" thread="" file="LTICleanup"> <![LOG[Logs contained 7 errors and 0 warnings.]LOG]!><time="11:48:36.000+000" date="07-25-2012" component="LTICleanup" context="" type="1" thread="" file="LTICleanup"> <![LOG[Stripping BDD commands from unattend.xml template.]LOG]!><time="11:48:36.000+000" date="07-25-2012" component="LTICleanup" context="" type="1" thread="" file="LTICleanup"> <![LOG[Modified unattend.xml saved to C:\windows\panther\unattend.xml]LOG]!><time="11:48:36.000+000" date="07-25-2012" component="LTICleanup" context="" type="1" thread="" file="LTICleanup"> <![LOG[Checking mapped network drive.]LOG]!><time="11:48:36.000+000" date="07-25-2012" component="LTICleanup" context="" type="1" thread="" file="LTICleanup"> <![LOG[testing drive Z: mapped to \\server\deploymentshare$]LOG]!><time="11:48:36.000+000" date="07-25-2012" component="LTICleanup" context="" type="1" thread="" file="LTICleanup"> <![LOG[Disconnecting drive Z: mapped to \\server\deploymentshare$]LOG]!><time="11:48:36.000+000" date="07-25-2012" component="LTICleanup" context="" type="1" thread="" file="LTICleanup"> <![LOG[Cleaning up C:\MININT directory.]LOG]!><time="11:48:36.000+000" date="07-25-2012" component="LTICleanup" context="" type="1" thread="" file="LTICleanup"> <![LOG[Cleaning up TOOLS, SCRIPTS, and PACKAGES directories.]LOG]!><time="11:48:36.000+000" date="07-25-2012" component="LTICleanup" context="" type="1" thread="" file="LTICleanup">

    Read the article

  • Unable to sync time using `ntpdate`, error: "no server suitable for synchronization found"

    - by William Ting
    My ntp.conf file: user@pc[0][07:37:40]:/etc$ cat /etc/ntp.conf idriftfile /var/lib/ntp/ntp.drift server 0.pool.ntp.org server 1.pool.ntp.org server 2.pool.ntp.org server pool.ntp.org Command output: user@pc[0][07:37:24]:/etc$ sudo ntpdate -dv pool.ntp.org 18 Jun 07:37:35 ntpdate[10737]: ntpdate [email protected] Tue Apr 19 07:15:05 UTC 2011 (1) Looking for host pool.ntp.org and service ntp host found : conquest.kjsl.com transmit(198.137.202.16) transmit(216.45.57.38) transmit(64.6.144.6) transmit(198.137.202.16) transmit(216.45.57.38) transmit(64.6.144.6) transmit(198.137.202.16) transmit(216.45.57.38) transmit(64.6.144.6) transmit(198.137.202.16) transmit(216.45.57.38) transmit(64.6.144.6) transmit(198.137.202.16) transmit(216.45.57.38) transmit(64.6.144.6) 198.137.202.16: Server dropped: no data 216.45.57.38: Server dropped: no data 64.6.144.6: Server dropped: no data server 198.137.202.16, port 123 stratum 0, precision 0, leap 00, trust 000 refid [198.137.202.16], delay 0.00000, dispersion 64.00000 transmitted 4, in filter 4 reference time: 00000000.00000000 Thu, Feb 7 2036 0:28:16.000 originate timestamp: 00000000.00000000 Thu, Feb 7 2036 0:28:16.000 transmit timestamp: d1a71a93.1f16c1e3 Sat, Jun 18 2011 7:37:39.121 filter delay: 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 filter offset: 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 delay 0.00000, dispersion 64.00000 offset 0.000000 server 216.45.57.38, port 123 stratum 0, precision 0, leap 00, trust 000 refid [216.45.57.38], delay 0.00000, dispersion 64.00000 transmitted 4, in filter 4 reference time: 00000000.00000000 Thu, Feb 7 2036 0:28:16.000 originate timestamp: 00000000.00000000 Thu, Feb 7 2036 0:28:16.000 transmit timestamp: d1a71a93.524a05dd Sat, Jun 18 2011 7:37:39.321 filter delay: 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 filter offset: 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 delay 0.00000, dispersion 64.00000 offset 0.000000 server 64.6.144.6, port 123 stratum 0, precision 0, leap 00, trust 000 refid [64.6.144.6], delay 0.00000, dispersion 64.00000 transmitted 4, in filter 4 reference time: 00000000.00000000 Thu, Feb 7 2036 0:28:16.000 transmitted 4, in filter 4 reference time: 00000000.00000000 Thu, Feb 7 2036 0:28:16.000 originate timestamp: 00000000.00000000 Thu, Feb 7 2036 0:28:16.000 transmit timestamp: d1a71a93.524a05dd Sat, Jun 18 2011 7:37:39.321 filter delay: 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 filter offset: 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 delay 0.00000, dispersion 64.00000 offset 0.000000 server 64.6.144.6, port 123 stratum 0, precision 0, leap 00, trust 000 refid [64.6.144.6], delay 0.00000, dispersion 64.00000 transmitted 4, in filter 4 reference time: 00000000.00000000 Thu, Feb 7 2036 0:28:16.000 originate timestamp: 00000000.00000000 Thu, Feb 7 2036 0:28:16.000 transmit timestamp: d1a71a93.857c6fbd Sat, Jun 18 2011 7:37:39.521 filter delay: 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 filter offset: 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 delay 0.00000, dispersion 64.00000 offset 0.000000 18 Jun 07:37:40 ntpdate[10737]: no server suitable for synchronization found

    Read the article

  • Is there a constant for "end of time"?

    - by Nick Rosencrantz
    For some systems, the time value 9999-12-31 is used as the "end of time" as the end of the time that the computer can calculate. But what if it changes? Wouldn't it be better to define this time as a builtin variable? In C and other programming languages there usually is a variable such as MAX_INT or similar to get the largest value an integer could have. Why is there not a similar function for MAX_TIME i.e. set the variable to the "end of time" which for many systems usually is 9999-12-31. To avoid the problem of hardcoding to a wrong year (9999) could these systems introduce a variable for the "end of time"?

    Read the article

  • /usr/share/zoneinfo when does the system time actually change?

    - by Steven Brown
    Please correct me if I am wrong here.... When I change my system clock this changes the file /usr/share/zoneinfo immediately, HOWEVER, the actual system time doesn't change until the next reboot because /etc/localtime then re-reads /usr/share/zoneinfo? I have seen behaviour similar to the above, whereby /usr/share/zoneinfo/ was accessed but the system time did not change until after the system had rebooted

    Read the article

  • Data Model Dissonance

    - by Tony Davis
    So often at the start of the development of database applications, there is a premature rush to the keyboard. Unless, before we get there, we’ve mapped out and agreed the three data models, the Conceptual, the Logical and the Physical, then the inevitable refactoring will dog development work. It pays to get the data models sorted out up-front, however ‘agile’ you profess to be. The hardest model to get right, the most misunderstood, and the one most neglected by the various modeling tools, is the conceptual data model, and yet it is critical to all that follows. The conceptual model distils what the business understands about itself, and the way it operates. It represents the business rules that govern the required data, its constraints and its properties. The conceptual model uses the terminology of the business and defines the most important entities and their inter-relationships. Don’t assume that the organization’s understanding of these business rules is consistent or accurate. Too often, one department has a subtly different understanding of what an entity means and what it stores, from another. If our conceptual data model fails to resolve such inconsistencies, it will reduce data quality. If we don’t collect and measure the raw data in a consistent way across the whole business, how can we hope to perform meaningful aggregation? The conceptual data model has more to do with business than technology, and as such, developers often regard it as a worthy but rather arcane ceremony like saluting the flag or only eating fish on Friday. However, the consequences of getting it wrong have a direct and painful impact on many aspects of the project. If you adopt a silo-based (a.k.a. Domain driven) approach to development), you are still likely to suffer by starting with an incomplete knowledge of the domain. Even when you have surmounted these problems so that the data entities accurately reflect the business domain that the application represents, there are likely to be dire consequences from abandoning the goal of a shared, enterprise-wide understanding of the business. In reading this, you may recall experiences of the consequence of getting the conceptual data model wrong. I believe that Phil Factor, for example, witnessed the abandonment of a multi-million dollar banking project due to an inadequate conceptual analysis of how the bank defined a ‘customer’. We’d love to hear of any examples you know of development projects poleaxed by errors in the conceptual data model. Cheers, Tony

    Read the article

  • Where does ntpdate get its settings from and what is the "no servers can be used" error about?

    - by wilhil
    When I run ntpdate on its own, I get the following output: 8 Jun 15:47:46 ntpdate[31251]: no servers can be used, exiting If I run it with the -q ntp.ubuntu.com switch, it seems to query just fine. I have been hunting through many files and the most relevant one I have found is /etc/default/ntpdate, however, even with NTPDATE_USE_CONF set to no, I just can't understand/see how this error is occurring Any ideas? Update-- been looking non stop... It appears that ntupdate-debianworks fine and is the actual command that makes use of /etc/default/ntupdate, but, this doesn't answer the main question and I still can't find it...

    Read the article

  • In which year was the date the same as the original year?

    - by Marta
    It's my first question on this site, but I always found this site really useful. What I mean with my question is: you ask the person to give a date (eg. Fill in a date [dd-mm-yyyy]: 16-10-2013) you than have to ask an interval between 2 years (eg. Give an interval [yyyy-yyyy]:1800-2000) When the program runs, it has to show what day of the week the given date is. In this case it was a Wednesday. Than the program has to look in which year, in between the interval, the date 16 October also fell on a Wednesday. So in the end it has to look something like this: Fill in a date: [dd-mm-yyyy]: 16-10-2013 Give an interval [yyyy-yyyy]: 1900-2000 16 October was a wednesday in the following years: 1905 1911 1916 1922 1933 1939 1944 1950 1961 1967 1972 1978 1989 1995 2000 The full date is Wednesday 16 October, 2013 The small (or biggest) problem is, I am not allowed to use the DATE.function in java. If someone can help me with the second part I would be really really happy, cause I have no idea how I am supposed to do this To find out what day of the week the given date falls, I use the Zeller Congruence class Day { Date date; //To grab the month and year form the Date class int day; final static String[] DAYS_OF_WEEK = { "Saturday", "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday" }; public void dayWeekInterval{ //code to grab the interval from interval Class, and doing stuff here } public void dayOfTheWeek { int m = date.getMonth(); int y = date.getYear(); if (m < 3) { m += 12; y -= 1; } int k = y % 100; int j = y / 100; int day = ((q + (((m + 1) * 26) / 10) + k + (k / 4) + (j / 4)) + (5 * j)) % 7; return day; } public string ToString(){ return "" + DAYS_OF_WEEK[day] + day; } }

    Read the article

  • How to run date picker onclick event?

    - by Nitz
    Hey Guys I am using this date picker from jqueryui. If see on that page, then u will find that they have just written in one function...means this... $(function() { $("#datepicker").datepicker(); }); </script> But i want to open my date picker on one text box click event. so i have written this $("#datepicker").datepicker(); in one function which i am calling on textbox onclick event. but in this there is one problem coming.. i am only get date picker on second time click on text box. if i click first time after page load then date picker will not come but as soon as i click second time then date picker is coming? WHY? AND CAN I DO IT ON FIRST CLICK? yes i know this already happening perfect if i put first code but i want it on my function.

    Read the article

  • asp.net mvc textbox date format

    - by maxxxee
    My form contains a textbox for date input. When submitted the data is used to add a row to the table. The view is strongly typed to the table. The problem is that the database server is configured with US date format. But the users need to use UK date format in the textbox. When users enter uk date format error is thrown. The database server configuration cannot be changed. So what can be done so that users can enter date in uk format?

    Read the article

  • jquery datepicker: select date as back as 6 months

    - by Abu Hamzah
    Start date: user can select start date as back as 6 months. example: if today is 04/23/2010 then i can go back up to 11/23/2009 but not more than 6 months. <script type="text/javascript"> $(document).ready(function () { $('#endDate').datepicker({ showOn: 'button', buttonImage: '../images/Calendar.png', buttonImageOnly: true, onSelect: function () { }, onClose: function () { $(this).focus(); } }); $('#startDate').datepicker({ showOn: 'button', buttonImage: '../images/Calendar.png', buttonImageOnly: true, onSelect: function (dateText, inst) { $('#endDate').datepicker("option", 'minDate', new Date(dateText)); } , onClose: function () { $(this).focus(); } }); }); update code: var currentDate = new Date(); var currentMonth = currentDate.getMonth() + 1; var sixMonths = currentMonth + 6 currentDate.setMonth(currentDate.currentMonth, sixMonths); var myNewCurrentDate = new Date(currentDate) $('#startDate').datepicker('option', { minDate: myNewCurrentDate }); i am getting currentDate = NaN

    Read the article

  • jQuery datepicker - change "today" date?

    - by Newbie
    Hello! Is there a way to change the "today" date in jquery.ui datepicker? With today, I mean today (class="ui-datepicker-today") and not the minDate or the current-selected date! I figured out, that datepicker uses the system time for default values. Now I get the current date from my server and set it to my minDate. But I didn't find a way to set the today-date... It still uses my system date (there are some users out there whose systemdate is in the year 2000 or earlier). Can U help me plz?

    Read the article

  • vb.net date format from textbox > MS SQL query

    - by Jonesy
    Hi folks, I have a date column in a DB tabel that I want to query using a date taken from textbox.text. the user selects a date from the calendar in the format dd/MM/yyyy. I want to use that date to put into a query. How do i format the date to be able to query the database? Dim datefrom As String =txtDateFrom.Text Dim dateto As String =txtDateTo.Text The query will look like this: WHERE (tblClient.ClientID = " & ClientID & ") AND (tblBackupArchive.BackupDate BETWEEN '" + datefrom + "' AND '" + dateto + "')" I'm using MS SQL Server btw. Any help most appreciated. Jonesy

    Read the article

  • sqlite3 date and interval functions

    - by umuthorax
    Hi, I wonder whether sqlite3 supports interval function. The following statement is accepted by PostgreSQL, however sqlite3 failed to parse it; select ... from orders where ... and o_orderdate < date '1995-03-01' + interval '3' month Error: near line 4: near "'1995-03-01'": syntax error Then, I modified the statement a little bit such as; and o_orderdate < date('1995-03-01') + interval '3' month This time the error was; Error: near line 4: near "'3'": syntax error Unfortunately, same trick did not work for the interval function i.e. and o_orderdate < date('1995-03-01') + interval('3' month) or and o_orderdate < date('1995-03-01') + interval('3') month or even and o_orderdate < date('1995-03-01') + interval(3 month) still gave me the syntax error. Maybe sqlite3 does not support interval function or am I missing something in its usage? Thanks a lot

    Read the article

< Previous Page | 30 31 32 33 34 35 36 37 38 39 40 41  | Next Page >