Mysql datetime datatype, from that datetime how can i compar only time part
Hello i have database table in mysql, there is Datetime datatype column, from that datetime how can i compare only time part .....??
Thanks in advance...
Note you can't simply just compare time via equality however.
Timestamp resolution is to the second or even milli-second. No user wants to match a time to an exact millisecond.
What they want is something like a match by hour - for example returning the number of transactions that happened from 1pm to 2pm. Even that isn't completely correct because then you need to consider whether 1pm and/or 2pm is inclusive or exclusive. Normally one end will be inclusive and the other exclusive.
So first you need to define what the period is.
Then construct the range.
Then pass the range and, as already mentioned, use specific functions to handle the extraction of the time.
Similar Messages
-
How can I delete only one part of my xml file?
Hello,
I stored more than 100 users in only one xmltype column. For instance
Create table agro(users XMLTYPE);
... and I inserted all users inside
INSERT INTO agro values(XMLTYPE
('<?xml version="1.0" encoding="ISO-8859-1"?>
<authentication><users><user>
<name>cocoon</name>
<password>cocoon</password>
<role>admin</role>
<title>Mr.</title>
<firstname>Walter</firstname>
<lastname>Cocoon</lastname>
<company />
<street />
<zipcode />
<city />
<country>DE</country>
<phone />
<fax />
<email />
<bankid />
<bankname />
<accountid />
</user>
... another user, etc.
</users></authentication>'));
Now I tried to delete only one part of this file. For example all persons with the name"cocoon".
I used for this target the following statement:
DELETE FROM agro agro
WHERE agro.users.extract('authentication/users/user/text()').getStringVal()= 'cocoon';
When I execute this statement, Oracle DB delete all users and not only with the name "Cocoon".
How can I delete only one part of my xml file?
Kind Regards
M RThis the expected behavoir. You uploaded a document containing multiple users and then asked XML DB to delete any documnet that contained a user with the name in question. The problem here is that you are creating a mega document that contains an aggregation of user documents but then trying to work with individual user documents. This is a bad idea.
In general XML does not understand the concept of a collection of documents. It can only operate on one document at a time. Hence the tendancy to aggregate individual documents into a single larger document. Once you have an XML database, you can perform operations on collections of document, as easily as you can perform operations on individual documents, so the need to aggregate the individual documents together disappears.
If you store each user document as a seperate document then your delete will work as expected. -
I bought a cd and downloaded it to my itunes account. I want to burn one to keep in my car, but dont get that option. how can i burn it from my itunes account?
Hello lindsey0315,
I read your post, and I have linked to an article that will instruct you on how to create CDs with iTunes:
iTunes 11 for Windows: Create your own CDs and DVDs
http://support.apple.com/kb/PH12348
Thank you for contributing to Apple Support Communities.
Cheers,
BobbyD -
All the CD's I have imported will not play. The only music that will play is cd's I have purchased from itunes. How can I get all my albums to play, please??
iTunes Store- Transferring purchases from iOS device or iPod to a computer
Downloading past purchases from the App Store, iBookstore, and iTunes Store
How to dowload purchased music -
Hi, I have registered at apple site, and i have submitted the credit card information, they deducted some ammount without my permission, why they did that? how can i remove my credit card details from that site or deactivate my account?
From that HT3702 page :
If you update your billing information, the iTunes Store or Mac App Store will place an authorization hold on your payment card account, usually in the amount of 1 USD or the local currency equivalent, to verify your account information.
You might see authorization requests on your online statement. These requests aren't actual charges; they are tests to confirm that your payment card account is active and has available funds to accommodate transactions. Authorization holds are removed by your financial institution shortly after your purchase clears. The time it takes to remove authorization requests varies by financial institution.
The number of days that it takes to diappear varies by bank, but it's usually a few days - though with the weekend coming up it might take an extra day or two -
When I right click on a link "Open link in new tab" since a few days, it "jumps over" the tab to the right and opens in the tab next to that. How can I change this back to opening in the tab next to the page from which I opened as it used to be?
Start Firefox in [[Safe Mode]] to check if one of the add-ons is causing the problem (switch to the DEFAULT theme: Tools > Add-ons > Themes).
* Don't make any changes on the Safe mode start window.
See:
* [[Troubleshooting extensions and themes]]
* [[Troubleshooting plugins]]
If it does work in Safe-mode then disable all extensions and then try to find which is causing it by enabling one at a time until the problem reappears.
* Use "Disable all add-ons" on the [[Safe mode]] start window to disable all extensions.
* Close and restart Firefox after each change via "File > Exit" (Mac: "Firefox > Quit"; Linux: "File > Quit") -
After deleting a song from my iPhone, it still playing. How can i stop that? How can i get rid of the song once for all?
I'm pretty sure that the solution is in the settings of her email
-
I just burned photos from different albums to CD-R. When I checked on the photos I burned on the CD-R afterwards, I noticed that the titles of each folder that these photos are extracted from appear. How can I get rid of these titles???
iPhoto 9.6 cannot open iPhoto Libraries on CD/DVD. The iPhoto Library needs to be on a writable storage. Copy the iPhoto library from the disk to a folder in your Pictures folder. And then run the iPhoto Library Upgrader on that copy, see this link: iPhoto '11: About the Library Upgrader
-
I tried to open Photoshop Elements 11. I got a message that components of the application are missing and that I needed to reinstall Photoshop Elements. I purchased the software by downloading it from Adobe so how can I reinstall it?
Are you launching Pages from an icon in your Dock? Installing the update does not change the Dock icons & it does not remove the older versions. Go to your Applications folder & launch the new Pages from there.
-
After downloading a pdf from a website, how can I view the file in Safari 6.0.4 (just as I can in Safari 5.0.6)? I bet that it's simple, but I've missed something, somewhere, and a solution will be greatly appreciated.
Hello Kirk,
Thank's for your efforts, and I just wish that this was the solution. Unfortunately, it isn't because, after double-clicking on the pdf in the website, it simply "opens" in another Safari window as a black screen - the pdf is there, somewhere, but not visible (either as an icon, or as a document).
When I right-click in the black Safari window, where the file is supposed to be, the only option available to display the file is to "Open file in Internet Explorer" (which is not what I want to do). Other options include saving or printing the pdf, which I don't want until I've confirmed that it's the form that I want. The same options are offered if I right-click on the file icon in the website.
Any other suggestions, please? -
I can't trasfer music from my library in itunes to my iphone 3GS. A black ring with a line through it comes up when i try to move music onto my iphone from itunes. How can I fix this so that I can load my phone with music?
How are you trying to transfer it and what are your setting on iTunes. I'm not on a computer that has iTunes at the moment so I'm going from memory and similar issue. If iTunes is set to sync music then I don't think you can select and drag, if set to manual manage music then you can. Also make sure you are dragging to music on the iPhone.
Hope this helps -
I got a new computer and need to re-install it, and remove it from my old, how can I do that?
Install Lightroom the same way you did the first time. Then follow these instructions on how to move your collection of images and your catalog.
How do I move Lightroom to a new computer? | The Lightroom Queen -
it says that i have to pay again to download it from itunes.. how can i get the game in my itunes and phone? do I accept the charges and it will be re-embersed? what should I do? I have the order confirmation number etc.
Contact iTunes Customer Service and request assistance
Use this Link > Apple Support iTunes Store Contact -
Had problem with my hotmail account and had to change my password. Ever since then, my default e-mail account set up to hotmail doesn't work...it sends from gmail. How can I correct that?
On your iPhone you need to change your password in 2 places:
- Incoming Mail Server and
- Outgoing Mail Server
To get to the password entry for the Outgoing Mail Server you have to tap on cell smtp.live.com and again on the second view. -
Hi.I recorded some song with GarageBand app and I made that song my ringtone but I can't deleting that ringtone from my iPhone.How can I delete It?
Delete it from itunes. Connect your iphone to your pc. Then delete it. Then sync your phone to your pc. It will be deleted.
Maybe you are looking for
-
Iphone won't connect to Computer or Itunes.
Hi. I was in ITunes syncing my phone when all of the sudden ITunes froze (surprising i know -_-). So I unplugged my IPhone, restarted ITunes and plugged my device back it. I got an error code (dont remember it) and it saying it couldn't connect to th
-
Cannot attach a pdf after extracting a page in Acrobat X Pro
I have a user that wants to extract one page from a multi page pdf and then e-mail it. He performs these steps - > Tools - Extract - Share - The file is not showing up in the Select Any Type of File box and the Attach to Email bubble is filled in. H
-
I recently updated my iPhone 5 to the iOS8.0.2 version and since then I cannot access my safari, my mail and my calendar icon is blank. Every time I touch the icon it just blinks, the phone screen goes white and then it reverts back to the main scre
-
Photoshop error when launching
I am trying to open my Photoshop but immediately when launched I receive the following error. Any thoughts on how to correct?
-
i am trying to build a table using jsf. it should group by category (read/unread) and/or date, then the actual data. my DTO contains all rows plus the extra info (read/unread+date) my first thought was: i just need a table with three rows per item. t