I need the value of the hour and the minute value separately. I need them for some calculations. I don't need this: echo %date% Output: Days/Months/Years; echo %time% Output Hours/Minutes/Seconds; I need: x Output: Hours; y Output: Minutes;
Update: Now that it's 2016 I'd use PowerShell for this unless there's a really compelling backwards-compatible reason for it, particularly because of the regional settings issue with using date. See @npocmaka's     What's a Windows command line statement(s) I can use to get the current datetime in a format that I can put into a filename?  I want to have a .bat file that zips up a directory into an archive with the current date and time as part of the name, for example, Code_2008-10-14_2257.zip. Is there any easy way I can do this, independent of the regional settings of the machine?  I don't really mind about the date format, ideally it'd be yyyy-mm-dd, but anything simple is fine.  So far I've got this, which on my machine gives me Tue_10_14_2008_230050_91:  rem Get the datetime in a format that can go in a filename. set _my_datetime=%date%_%time% set _my_datetime=%_my_datetime: =_% set _my_datetime=%_my_datetime::=% set _my_datetime=%_my_datetime:/=_% set _my_datetime=%_my_datetime:.=_%  rem Now use the timestamp by in a new ZIP file name. "d:\Program Files\7-Zip\7z.exe" a -r Code_%_my_datetime%.zip Code   I can live with this, but it seems a bit clunky. Ideally it'd be briefer and have the format mentioned earlier.  I'm using Windows Server 2003 and Windows&nbsp;XP Professional. I don't want to install additional utilities to achieve this (although I realise there are some that will do nice date formatting).
I'm using the built in Screen Sharing tool in El Capitan to control an iMac from a Macbook Pro in full screen mode. Everything works beautifully except that many special keys and gestures are intercepted by the local Mac and not sent to the shared Mac. Specifically:   Ctrl-Arrow (Desktops and Mission Control) F3 (Mission Control) F4 (LaunchPad) Three finger swipe (Switch between Desktops, Mission Control, Exposé) Two finger swipe from left side (Notification Center) Pinch with four fingers (Launchpad)   I can't find any way to switch between desktops on the remote machine other than manually opening the Mission Control app from the Finder or Dock. Disabling the gestures on the local machine doesn't help; they still don't get sent to the remote machine.  Is there any way to get special keys and gestures passed to the shared machine? Probability that median falls within a range? If I draw 5 samples from a distribution that is cont., what is the probability that the median of the population is between the xmin and xmax of the draw samples?  What is the formula to apply here? Adding parentheses around subfig references Say I have a figure with two subfloats inserted using the subfig package.  When I reference them with \ref{myLabel} I get this     Figure 3.5a and 3.5b.     But what I want is this:     Figure 3.5(a) and 3.5(b).   How can I add the parentheses? What defines a native English Speaker? I think this particular phrase creates a lot of concern in English learners. From general conversation to posts here, we see native speaker a common usage when talking about a person who speaks English by birth. So according to this definition, inhabitants of all the countries considered as  should be considered as native speakers. But herein lies my confusion. Would we conclude a random inhabitant of these countries to be a native speaker (as there is a chance of them to be a English speaking person)?    Also, I think Native speaker can also be one whose mother tongue is not English but uses English a lot in day-to-day life. For example, I don't speak English by birth, but as , I have to use English daily for at least 5 hours a day in my normal life. So can I consider myself as native because I use it frequently?  UPDATE 1 - From Googling, I could not find any dictionary sites explaining this phrase. The results only include different forum answers. So I thought of asking the question here and perhaps wise users here can help me out with the actual meaning.  UPDATE 2 - Later I thought it is worth adding that Anglo Indian families (and some purely Indian families too) who are born and raised here in India, speak English from birth and their first language is English and English is their primary means of communication although I cannot admit they fully abide by or understand all English cultural values like a British or an American. So what can I call them? Are they native? how to show textview and edittextview on same line? Combine PHP prepared statments with LIKE Why does $\log(n!)$ and $\log(n^n)$ have the same big-O complexity? In an example that I found, it is said that $\log(n!)$ has the same big-O complexity as $\log(n^n)$. Please explain why this is the case. My company has purchased a product that renders an ASP.NET control on the page. This control uses jQuery 1.2.3 and adds a script tag to the page to reference it. The developers of the control will not support use of the control if it modified in any way (including modification to reference a different version of jQuery).  I'm about to start development of my own control and would like to use the features and speed improvements of jQuery 1.3. Both of these controls will need to exist on the same page.  How can I allow the purchased control to use jQuery 1.2.3 and new custom development to use jQuery 1.3? Also out of curiosity, what if we were to use an additional control that needed to reference yet another version of jQuery? I need to prove that $\mathbb{R}\backslash\mathbb{Q} \sim \mathbb{R} $  Using Cantor-Bernstein, need to show an injection from $\mathbb{R}\backslash\mathbb{Q}$ to $\mathbb{R}$ and from $\mathbb{R}$ to $\mathbb{R}\backslash\mathbb{Q}$.    $\mathbb{R}\backslash\mathbb{Q}$ is a subset of $\mathbb{R}$ so only need to show injection from $\mathbb{R}$ to $\mathbb{R}\backslash\mathbb{Q}$ to complete the proof.    Possible injection: $f:\mathbb{R}\to \mathbb{R}\backslash\mathbb{Q}$ defined as $f(x) = \pi x$ if $x$ is not a multiple of $\pi$; otherwise $f(x) = \sqrt{2} x$.    Not sure if $f$ actually is an injection... My little brother is just getting into programming, and for his Science Fair project, he's doing a simulation of a flock of birds in the sky. He's gotten most of his code written, and it works nicely, but the birds need to move every moment.  Tkinter, however, hogs the time for its own event loop, and so his code won't run. Doing root.mainloop() runs, runs, and keeps running, and the only thing it runs is the event handlers.  Is there a way to have his code run alongside the mainloop (without multithreading, it's confusing and this should be kept simple), and if so, what is it?  Right now, he came up with an ugly hack, tying his move() function to &lt;b1-motion&gt;, so that as long as he holds the button down and wiggles the mouse, it works. But there's got to be a better way. Is it possible to access a static resource of a managed package in your local environment?  Thanks We completed development on our dev environment and I copied the files over from the dev server to the production server through FTP.   Then through back up and migrade module, I made a back up of the SQL database. I created a new database through Plesk with the same name, username and password. I then imported the SQL database into the new server through phpmyadmin. I go to the URL and get the Site Maintenance message (which is correct, I placed the site in maintenance mode before copying the files over) but cannot navigate to any sub pages. Generally I can add /user or /admin to the end of the url and get the login screen. However all I get are 404 errors. I use a Canon EOS Rebel T3i (600D) with the kit lens. I have experimented a lot with different settings and modes, but I feel like I have wasted many good shots that could have looked amazing, if only they were a little bit sharper.  I use auto-focus on most of my pictures and make sure to choose the right focus point, but all of my photos are still a little bit out of focus. When I zoom in, I can see that the pixels are not very crisp or well-aligned.  I am not sure if this issue is caused by my equipment or skills. Galois Group of $\sqrt{2+\sqrt{2}}$ over $\mathbb{Q}$ Is it safe to delete from C:\Windows\Installer? Divisibility and the Fibonacci sequence What does "official Ubuntu flavour" mean? What kind of support do they receive from Canonical or/and Ubuntu community? Who decides a distro should become official flavour? What privileges do "official flavours" have over unofficial derivatives of Ubuntu like Linux Mint, Elementary OS, Deepin OS,etc.? Say a prospective PhD has a high reply rate (90-95%) to first contact emails with potential superviors. He/She has a well thought out e-mail, but a particular professor (here: USA) that is in the top preferences does not reply after two to three e-mails that were sent within a time frame of three months. I also followed the instructions on the professor personal website in the section "prospective PhD students". The student has already contacted some of the advisor students and has received positive feedback about the professor.  Should the student just give up and move on? Should the student keep trying?  Aside from the obvious "I have too many incoming e-mails to answer" or "I am out in the field", what could create a no response behavior from the professor?  I have seen the simplistic answer "move on, bad advisor, doesn't have time, etc". But this seems a contradiction in this case. The PhD students like the professor and say he/she is personable and no e-mail response after a few well written emails. What is "step size" in LASSO regression? Recovering a password for a Word 2007 document