Convert string to date in sql server? I have a string b = "25/06/2013"; And I want to convert it to stored in SQL Server (data type=date) June, 25, 2013.  Please advise me.
Sql Server string to date conversion I want to convert a string like this:  '10/15/2008 10:06:32 PM'   into the equivalent DATETIME value in Sql Server.  In Oracle, I would say this:  TO_DATE('10/15/2008 10:06:32 PM','MM/DD/YYYY HH:MI:SS AM')    implies that I must parse the string into one of the , and then convert using one of those codes.  That seems ludicrous for such a mundane operation.  Is there an easier way?
I need to install a new TeX/LaTeX/ConTeXt package on my computer.  I'm running Ubuntu/Fedora/Slackware/Some-Version-Of Linux.  What are the possible ways to do this?    Note:&nbsp;&nbsp; We get a number of questions that essentially reduce to this one; it was felt a good idea to have one question-and-answer that can cover all the standard methods.  See  for the discussion.  The question-and-answer are CW so that more information can be easily added.  If you have information to add, please do so.  If you are unsure, leave a comment here or (preferably) in .  Comments on the question and answer will be periodically removed to ensure that the information is clear. Custom script "invoked too many times" error Credit:   function getDirection(city1, city2, unit) {   var directions = Maps.newDirectionFinder()     .setOrigin(city1).setDestination(city2)     .setMode(Maps.DirectionFinder.Mode.DRIVING)     .getDirections();   var d = directions.routes[0].legs[0].distance.text;    var distance, value = d.split(" ")[0].replace(",", ""), text = d.split(" ")[1];   if(text == unit) {     distance = value;   } else if(text == "km" &amp;&amp; unit == "mi") {     distance = value / 1.6;   } else {     distance = value * 1.6;   }   return Math.round(distance); }   I have used this code snippet in one of my sheets. I am working on a dataset with roughly 6000 entries and I am getting some errors because of the large volume.      Script invoked too many times per second for this Google user account. (line 0).      Service invoked too many times for one day: route. (line 4).   I considered purchasing a Google Apps business account to increase my quota, but that might not even help. Do you maybe have any advice for me in this regard? In C# check that filename is *possibly* valid (not that it exists) Is there a method in the System.IO namespace that checks the validity of a filename?  For example, C:\foo\bar would validate and :"~-* would not  Or a little trickier, X:\foo\bar would validate is there is an X: drive on the system, but wouldn't otherwise.  I suppose I could write such a method myself, but I'm more interested in a built-in one. Can helium disappear from Earth? What is the difference between sector and cluster? I have gone through wikipedia and other sites and here's the information I have obtained.  Sector: Smallest Addressable Unit (mostly 512 bytes) Cluster: Smallest Allocation Unit (equals to 1 or more sectors and the number of clusters depends on the file system).  Let's say in the below example:  sector =512 bytes and a cluster =8 sectors=4096 bytes. Now, I am having a hard time figuring out, when I am trying to create a file what does the file system do? Does it consider 4096 bytes as the smallest write/read unit or 512 bytes?  If the answer is 4096 bytes: When the manufacturer of the disk drives has provided 512 bytes as the smallest addressable unit, why does the file system consider cluster as the smallest unit? I mean, what are the advantages in doing so? There is a length limit to Windows file extensions? Why is DML not allowed in Constructor? Compute $P(Y<3X)$ using joint PDF I'm given a joint pdf  $f_{X,Y}(x,y)=2e^{-x-y}, 0&lt;x&lt;y, 0&lt;y $  and asked to compute $P(Y&lt;3X)$. To do this, I let $Y=3X$ (the boundary) and found that the region of integration is under this line.  To find $P(Y&lt;3X)$, it seems to me that the integral for this region be written as   $P(Y&lt;3X)=\int_0^\infty \int_0^{3x} 2e^{-x-y} dy dx  $  However this isn't right, as the boundaries are actually   $P(Y&lt;3X)=\int_0^\infty \int_x^{3x} 2e^{-x-y} dy dx  $  Why is this? I'm having a hard time seeing how to construct these boundaries (especially the fact that the $y$ boundary goes from $x$ to $3x$ instead of $0$ to $3x$)  Thank you. Are there rules for creating level 0 characters? Are there rules for creating level 0 characters in 5e? I've been running a campaign where the players begin sub-standard and 1st Level characters are generated in-game as the story unfolds. I just made them all begin with a couple of hp and 9's across the board for ability scores (since I wanted them at a disadvantage compared to the average human, and to fail at a generic DC10 task more often than succeed).  It was a real grind, with many opportunities for TPK (total party kill) when faced with even a single challenge rating 1/2 adversary (obviously I fudged the dice a little to prevent this). Are there published rules for this?  If there aren’t published rules for this, has anyone tried doing something like this? Any first hand experience on how it has played out would be welcome. How can I execute a function on pressing the enter key in an  field? Should the first word after a colon be capitalized? Infinite group with only two conjugacy classes How to force file download with PHP I started a Roth IRA a little while ago, contributing ~$5,000, and I'd like some guidelines on how I should diversify my investments.  Should I invest in stocks or bonds or mutual funds or ETF? What percent should I contribute to these investments?  Additionally, I'm 30 years old, how might my age factor into diversification?  I understand that this is a very subjective question but any suggestions are greatly appreciated. Wifi not working in Ubuntu 14.04.3 How do AD/AP boosts apply to abilities with long cast times, channels or animations? For example: I'm playing Janna in bot lane with Caitlyn. Caitlyn begins channeling Ace in the Hole to finish off an enemy. Will the AD buff from my Eye of the Storm apply extra damage to Caitlyn's ultimate if I cast at after she begins channeling? Similarly, if I see Caitlyn rev up to shoot Piltover Peacemaker, can I boost her AD after the animation begins? (If I remember correctly, Piltover Peacemaker has a quick cast time, but the spell animation is rather long, so it may be a different circumstance from the first example.)  Basically, I want to know if the AD is calculated at the start of a cast, at the end of a cast, or when the ability actually creates and object on the battlefield. If you have a glass of water, say, three quarters full and you pour it at an angle of say, $45^{\circ}$ with respect to the the table, the water comes out of the glass and goes directly down towards the floor.  However, when the glass is more full, or even three quarters full and the 'angle of pouring' is far less with respect the table, when the water comes out of the glass, rather than going straight down it kind of stays stuck to the glass and travels down the outside of it.  Why does this happen? (I'm sure many of you have observed it yourself by accident and ended up making a mess). I'm looking to create a simple short-lived reservation system, and I'd like to generate confirmation numbers that are   unique random-looking alphanumeric short-ish, at least much shorter than 32 character-long strings returned by sha1   I'm only looking to have ~500 reservations, so I don't imagine high likelyhood of collissions.  One idea I had is generate an sha1 hash based on a date-time stamp and username, then truncating it to its first 10 characters.  Would something like that be reliably unique enough for the purposes of processing ~500 reservations? How to delete a file ending in a dot in Windows 7? After installing Cygwin on Windows 7 and realizing I'm better of with using Linux on a different partition, I wanted to uninstall it. However, Cygwin has no uninstaller so I was left with the option of deleting the whole folder it was installed in – which I did.  The problem is that a single file remained, in the whole directory tree, named README. at  C:\cygwin\usr\share\texmf-dist\doc\latex\hausarbeit-jura\README.  I know Windows isn't supposed to allow files with names ending in ., but this one obviously got through, and I cannot delete it. When trying to do that, I get     Item Not Found      This is no longer located in C:\cygwin\usr\share\texmf-dist\doc\latex\hausarbeit-jura. Verify the item's location and try again.   When viewing the properties of the file (Right-click, Properties), Windows tells me that it has 0 bytes.   However, when viewing it in the explorer window, and clicking on it, the windows status bar thing tells me it has 517 bytes.  Any ideas on how to get rid of it? How do I get rid of my bounty?