Results 1 to 8 of 8
Like Tree1Likes
  • 1 Post By JosAH

Thread: Checking date lying between two days of month

  1. #1
    vkram.singla is offline Member
    Join Date
    Mar 2012
    Posts
    3
    Rep Power
    0

    Default Checking date lying between two days of month

    Dear All,

    I have got very interesting requirement in my project. I need ti check if a date is lying between two days.
    Let me elaborate :) Requirement is that I will have two numbers say 25th and 2nd in my database(these days are dynamic so I am putting these in DB, can not hard code) , I need to check if my sysdate is lying in between 25th and 2nd of any month.

    Please help me in this as this is very crucial for me and also I am not getting any solution for this.

    Thanks in advance.

  2. #2
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    11,817
    Rep Power
    19

    Default Re: Checking date lying between two days of month

    How would you do this by hand?
    Please do not ask for code as refusal often offends.

    ** This space for rent **

  3. #3
    vkram.singla is offline Member
    Join Date
    Mar 2012
    Posts
    3
    Rep Power
    0

    Default Re: Checking date lying between two days of month

    Sorry Tolls, could not get you!!!
    Am I able to make you understand my requirement or do you want more clarification.

  4. #4
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    11,817
    Rep Power
    19

    Default Re: Checking date lying between two days of month

    Yes, I know what you need, but see my signature.
    How would you do this by hand?
    That will give you your algorithm.
    Which will then give you your code.
    Please do not ask for code as refusal often offends.

    ** This space for rent **

  5. #5
    vkram.singla is offline Member
    Join Date
    Mar 2012
    Posts
    3
    Rep Power
    0

    Default Re: Checking date lying between two days of month

    Just suggest for some algo only if you can help in that way!!! :)
    Or if is it fine with you can you please suggest what all APIs we can use.

    I have tried Date and Calendar API but failed to achieve.

  6. #6
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    SW Missouri
    Posts
    17,306
    Rep Power
    25

    Default Re: Checking date lying between two days of month

    Is this your problem: You have three dates and you want to be able to compare them to see if one is between the other two?

  7. #7
    JosAH's Avatar
    JosAH is online now Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,354
    Blog Entries
    7
    Rep Power
    20

    Default Re: Checking date lying between two days of month

    I'm unable to see anything advanced in this thread; I'm moving it to the New To Java section.

    kind regards,

    Jos
    DarrylBurke likes this.
    cenosillicaphobia: the fear for an empty beer glass

  8. #8
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    11,817
    Rep Power
    19

    Default Re: Checking date lying between two days of month

    Quote Originally Posted by vkram.singla View Post
    Just suggest for some algo only if you can help in that way!!! :)
    Or if is it fine with you can you please suggest what all APIs we can use.

    I have tried Date and Calendar API but failed to achieve.
    Please don't PM for solutions.
    This is an open forum for handling problems, not a private service.

    Show us the code you have tried and maybe we can point out where you are going wrong.
    WHen doing that please use [code] tags [/code] and also give any errors you get, highlighting what line(s) they are occurring on.
    Please do not ask for code as refusal often offends.

    ** This space for rent **

Similar Threads

  1. days remaining to a particular date
    By aconti in forum New To Java
    Replies: 1
    Last Post: 05-30-2011, 12:16 PM
  2. want the first date and last date of each month
    By javastuden in forum New To Java
    Replies: 3
    Last Post: 02-24-2010, 10:31 AM
  3. how to get 10 days prior system date
    By vanitha nanda in forum Java Applets
    Replies: 7
    Last Post: 09-27-2009, 01:45 AM
  4. adding days to a date
    By karen.tao in forum Java Applets
    Replies: 13
    Last Post: 09-13-2009, 09:05 PM
  5. date one month back
    By senzacionale in forum New To Java
    Replies: 1
    Last Post: 12-24-2007, 09:02 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •