How can I have both date and time for a Date type variable?

If I have a Date type variable: Date today=new Date(), Is it possible to also give the current time to "today" but still keep the type as Date?
I mean , for exmaple I want to store this "today" to database as Date type, and the value in database is "2007-05-05 13:30:13". I do not want to use SimpleDateFormat to do that, because I want to use Date type not String. Is that possible? how to implement this?

I'd say he means you should use Timestamp to store
the time value, because that's what it's there for.
Because java.sql.Date is defined not to store a
time value.Correct. The OP should read the Javadoc for java.sql.Timestamp.

Similar Messages

  • How can I have both genius playlist and regular playlist on my new 160g ipod classic. The list of songs are there, but when I click playlist, I only get the genius playlists.

    How can I have both genius playlists and regular playlists available on my new 160g classic ipod. I can see my entire song list, but no playlist other than the 3 genius playlist I just made.  Also how can I delete a genius playlist. Made the same playlist twice by mistake. Thanks.

    This was not a simple task.  Got it handled.  Had to call Apple support. Apparently, the 160g only syncs the genius playlist.  You have to go in and "tell it" to sync the entire playlist as well as the genius playlists. There is also an option for only syscing certain songs. On itunes, there is two sections; one for the stuff that is synced on your ipod and another separate list for the stuff in your library!  This is exciting for me as I am not computer savvy to say the least. 

  • How can i use both Windows and Mac os at the same time on my iMac

    How can i use both Windows and Mac os at the same time on my iMac

    You can use Parallels desktop or VM Fusion to run both operating systems at the same time. Both programs work well, but I personally perfer VM Fusion.

  • When insert my lexar USB flash drive I get the message that the disk was not readable by this computer.  It has worked previous to this and I do not want to lose the data by reformatting the drive.  How can I reformat this drive and not lose my data?

    When insert my lexar USB flash drive I get the message that the disk was not readable by this computer.  It has worked previous to this and I do not want to lose the data by reformatting the drive.  How can I reformat this drive and not lose my data?

    You can't reformat it and not wipe everything on it.
    Have you tried a different USB port?
    Only other option, back it up on a different computer.

  • I have a new ipad air and my own apple id. My wife has iphone and her own apple iD.  All our music is in her apple id.  can i sync both ipad and phone for music but keep my ipad separate from her iphone ?

    I have a new ipad air and my own apple id. My wife has iphone and her own apple iD. 
    All our music is in her apple id.  can i sync both ipad and phone for music but keep my ipad separate from her iphone for everything else?

    How to use multiple iPods, iPads, or iPhones with one computer
    http://support.apple.com/kb/HT1495
    How to Share a Family iPad
    http://www.macworld.com/article/1163347/how_to_share_a_family_ipad.html
    Using iPhone, iPad, or iPod with multiple computers
    http://support.apple.com/kb/ht1202
    iOS & iCloud Tips: Sharing an Apple ID With Your Family
    http://www.macstories.net/stories/ios-5-icloud-tips-sharing-an-apple-id-with-you r-family/
    How To Best Use and Share Apple IDs across iPhones, iPads and iPods
    http://www.nerdsonsite.com/blog/2012/06/07/help-im-appleid-confused/
     Cheers, Tom

  • How can I have multiple accounts and only one library

    How can I have multiple accounts and only one library that all the purchased items feed into?

    ask your wireless provider.

  • How can I print BOTH legal and letter on my duel tray printer????

    How can I print BOTH legal and letter on my duel tray printer from my mac? on a pc you can choose "print according to pdf size" and the mixed document will print in both legal and letter auto-selecting the printer tray.

    Hello CKAY,
    My old printer does not show 8x10 either.
    In the printing preferences under the Paper/Quality tab, do you see a "Custom" option or button? There should be one in there somewhere in your preferences.
    Click on that and create a custom size of 8 in for the width and 10 in for the length. Be sure to "Name" it 8x10 Photo and click ok.
    Now give it whatever attributes you want under the other tabs and click Apply and OK (or just OK).
    Close out the printer and open it again and the new size you created should show in the list.

  • I have just updated to Pages 5.1 and now the templares which I have saved do not displat the header and footer which they were saved with in the previous version.  How can I have the header and footer included when I open a template?

    I have just updated to Pages 5.1 and now the templares which I have saved do not displat the header and footer which they were saved with in the previous version.  How can I have the header and footer included when I open a template?

    That is becuase Pages 5.1 has numerous unnounced surprises for the unwary user.  Among the surprises:
    - it strips out images from headers and footers without warning
    - it strips out bookmarks without wanring (yes, all those bookamrks you laboriously put into a document: poof! Gone.)
    - it strips out alternating left/right margins, without warning.
    There are many more suprises, as you'll see from glancing through these discussions. They fall into two main categories: things that are present in version 4.3 but that are missing in 5.1, things like
    -mail merge
    -meaningful Applescript/Services support
    -non-contiguous text selection
    -ability to set defaul zoom
    -ability to see comments while editing
    -ability to print comments
    -ability to read RTF files
    -ability to drag in hyperlinked ted from a browser
    These about about 90 other features are gone.
    Then there are the bugs.  Hyperlinks do not reliably export to a PDF file any longer. There have been multiple problems with printing report. Some fonts place stray characters in the headers.  Many reports of the program crashing, courrupting files, etc.
    Fortunately for you, the previous version of Pages is still on your system.  Export any documents you may have created or edited with Pages 5.1 (another great surprise: files created with version 5.1 cannot be read by any previous version of Pages: not just 4.3 but even 5.01!).  Then trash 5.1 and use 4.3 until (unless?) it is stable and has a reasonably robust feature set.

  • My iPad was stolen, how can I have it blocket and/or send to the iPad a message to get it back

    My iPad was stolen, how can I have it blocket and/or send to the iPad a message to get it back

    If you enabled Find My iPad on it before it was stolen, and if it is still turned on and connected to the internet with Find My iPad enabled, you can do this by going to icloud.com as explained here: http://help.apple.com/icloud/#/mmfc0f0165.

  • Can we have both 9i and 10g db running on the same machine

    Hi,
    I want to to exp/imp upgrade of my 9i db to 10g db.
    Can I have both 10g and 9i installed on the same server?
    Thanks,
    Kavitha

    Yes, provided that the HW, OS version and Patch level are certified for both 9i and 10g.
    Install 10g into a seperate ORACLE_HOME -- whether under the same "oracle" account or a different (e.g. "oracle10g" account).
    However, you should consider 11g as 10g is being desupported this month (i.e. no new patches / fixes will be available for 10g)
    Hemant K Chitale
    Edited by: Hemant K Chitale on Jun 9, 2010 10:58 AM

  • How can I have both functions "Read Only" & "Write" mode on the same form?

    Dear all,
    How can I have both functions "Read Only" & "Write" mode on the same form? Is it possibile for this?
    Please advice,
    Amy

    This is what I use in some dialogs:
    PROCEDURE SET_QUERY_ONLY IS
      -- Procedure Set_query_only
      -- Rend les blocks non modifiables   --
      -- Disable menus Insert/Delete/Clear --
      -- Entree               :
      -- Sortie               :
      -- Ent/Sortie     :
      -- Creation               : FD    10/2003
      -- Modification     : 
         LC$Block     Varchar2(30) ;
    BEGIN
      Set_Menu_Item_Property('Edit.Insert', ENABLED, PROPERTY_FALSE ) ;
      Set_Menu_Item_Property('Edit.Remove', ENABLED, PROPERTY_FALSE ) ;
      Set_Menu_Item_Property('Edit.Clear', ENABLED, PROPERTY_FALSE ) ;
      Set_Menu_Item_Property('Action.Save', ENABLED, PROPERTY_FALSE ) ;
      LC$Block := get_form_property( NAME_IN('System.Current_Form'), FIRST_BLOCK ) ;
      -- Tous les blocs en Query only --
      While LC$Block is not null Loop
           Enable_Block( LC$Block, FALSE ) ;
           LC$Block := get_block_property( LC$Block, NEXTBLOCK ) ;
      End loop ;
    END;
    PROCEDURE ENABLE_BLOCK
              PC$Block in Varchar2,
              PB$Enable in Boolean Default TRUE
         ) IS
      -- Procedure Enable_block
      -- Rend le bloc Enable / Disable --
      -- Entree          : PC$Block (nom du bloc Forms)
      --               : PB$Enable (TRUE ou FALSE)
      -- Sortie          :
      -- Ent/Sortie             :
      -- Creation          : FD    10/2003
      -- Modification     : 
    BEGIN
         If PB$Enable Then
              Set_Block_Property( PC$Block, INSERT_ALLOWED, PROPERTY_TRUE ) ;
              Set_Block_Property( PC$Block, UPDATE_ALLOWED, PROPERTY_TRUE ) ;
              Set_Block_Property( PC$Block, DELETE_ALLOWED, PROPERTY_TRUE ) ;
              Set_Menu_Item_Property('Edit.Insert', ENABLED, PROPERTY_TRUE ) ;
              Set_Menu_Item_Property('Edit.Remove', ENABLED, PROPERTY_TRUE ) ;
              Set_Menu_Item_Property('Edit.Clear', ENABLED, PROPERTY_TRUE ) ;
              Set_Menu_Item_Property('Action.Save', ENABLED, PROPERTY_TRUE ) ;
         Else
              Set_Block_Property( PC$Block, INSERT_ALLOWED, PROPERTY_FALSE ) ;
              Set_Block_Property( PC$Block, UPDATE_ALLOWED, PROPERTY_FALSE ) ;
              Set_Block_Property( PC$Block, DELETE_ALLOWED, PROPERTY_FALSE ) ;
              Set_Menu_Item_Property('Edit.Insert', ENABLED, PROPERTY_FALSE ) ;
              Set_Menu_Item_Property('Edit.Remove', ENABLED, PROPERTY_FALSE ) ;
              Set_Menu_Item_Property('Edit.Clear', ENABLED, PROPERTY_FALSE ) ;
              Set_Menu_Item_Property('Action.Save', ENABLED, PROPERTY_FALSE ) ;
         End if ;
    END;Francois

  • How can I open both UDP and TCP ports

    Hi,
    How can i open both tcp and UDP ports for an IP in Cisco ASA?
    Regards
    Ejaz

    Are you referring to port opening in Cisco ASA to permit certain traffic? I believe the following document should help.
    http://www.cisco.com/en/US/docs/security/asa/asa82/configuration/guide/acl_overview.html
    Adding a Standard Access List
    hostname(config)# access-list access_list_name standard {deny | permit} {any | ip_address mask}
    Example:
    hostname(config)# access-list OSPF standard permit 192.168.1.0 255.255.255.0
    http://www.cisco.com/en/US/docs/security/asa/asa82/configuration/guide/acl_standard.html
    Adding an Extended Access List
    access-list access_list_name [line line_number] [extended] {deny | permit} protocol source_address mask [operator port] dest_address mask [operator port | icmp_type] [inactive]
    Example:
    hostname(config)# access-list ACL_IN extended permit ip any any
    http://www.cisco.com/en/US/docs/security/asa/asa82/configuration/guide/acl_extended.html
    Hope this will help.

  • Adjust Date and time for all Photos in an event?

    Would some one tell me how to adjust the date and time for all photos in an event. For some reason when I change the date, it only changes the first photo in the event and I am left with a range of dates in the event, but I would rather they all have the same date in the event. Any thoughts or ideas?

    How are you selecting the photos and changing them? How much of a change are you trying to make? A total change of date and time or just a delta change either plus or minus?
    Using the Photos->Adjust Date and Time... menu option will apply the time/date difference to all of the photos in the Event if you click on the Event icon in the Photos mode or the Event mode.

  • Unable to Determine the Change Date and Time for records in infotype 2011

    Hi Everyone,
    We need to know on when the clock-in and clock-out records were interfaced to SAP in infotype 2011.
    The change date/time field in infotype 2011 is blank/not populated. Hence, we're unable to determine on when the clock-in records were updated in infotype 2011.
    It is not possible to get the audit logs for infotype 2011 as it is switched off.
    We found this table TEVEN and just the same thing, the field "change on" is blank.
    Kindly help us on how we can determine the change date and time for records in infotype 2011.

    Hi Prasad,
    Here's the scenario.
    On June 3, it was reported that staff's clock-in record on june 1, 7:00AM is missing in infotype 2011.
    However, when I checked infotype 2011, the record is there.
    So, they are now asking me on when this record was updated in infotype 2011 as they are thinking that there might be some delays in sending of the data to SAP.
    The created on and created at in table TEVEN shows the same, june 1, 7:00AM which seems to be not true as on june 3, it was reported to be missing.
    Can you help further on this?

  • Reminder app not working correctly, issue started around Sept. 1,2014. Will not allow me to set date and time for a reminder.

    Today I noticed an issue with my Reminder app on my IPhone 5s. Using OS 7.1.2. I called Apple, and the tech didn't know what he was doing and just trying different things.The reminder app will not let me set a date and time for reminder. Finally he escalated the call to a senior advisor who was rude, arrogant and unprofessional. He insisted the Reminder App was updated with the new update of IOS September/October 2013. Not true, the issue just started about 5 days ago August 31,2014. Now there is an additional reminder line for reminder entries that I have to use and have to transfer all my reminders manually from the other part of the app. The feature does exist; if I try to set a date and time for the reminder it appears for 1-2 seconds and then disappears.
    Has anyone else noticed this issue?

    He insisted the Reminder App was updated with the new update of IOS September/October 2013. Not true
    Yes, it is true.
    iOS 7 was released 18 Sep 2013. At this time, the Reminders app was updated (with most everything else).
    the issue just started about 5 days ago August 31,2014.
    Your issue just started but the app was not updated 5 days ago.
    Now there is an additional reminder line for reminder entries that I have to use
    I don’t understand what this means...
    Open Reminders, type the reminder, tap the i at the end, turn on Remind me on a day and enter the date/time.

Maybe you are looking for

  • Customer Service in Apple retail stores

    Does anyone think it is acceptable that The Apple Store in Bath Southgate has just sent me away with 2 faulty products (one a brand new iphone) and told me that I need to make an appointment at their 'genius bar'. In any other store when you spend £6

  • Ipod touch gen 4 photo negative problem

    after updated to IOS, my ipod screen is in photo negative along with all my icons. How do I correct this?

  • Suspend When Called Bug

    I found a bug related to Suspend When Called VIs in LabVIEW 2009. I've posted the details and a video on LAVA here: http://lavag.org/topic/11252-suspend-when-called-bug-in-2009/ Basically, suspended VI input changes are ignored in suspend mode -- onl

  • When I click to buy something, nothing happens

    Sometimes , if its a video, the preview starts playing

  • Pixel Bender command line compiler.

    A blog post from kevin goldsmith http://blogs.adobe.com/kevin.goldsmith/2008/09/spilling_the_be.html says that adobe is soon going to release a command line compiler for pixel bender. has there been any  progress on this as i'd really like to get my