Results 1 to 2 of 2
  1. #1
    Join Date
    Mar 2004
    Location
    Pakistan
    Posts
    15

    Unanswered: i m using vb 6.0 n sqlserver 2000

    hi
    i m using masked text box to save time in tableof sqlserver 2000........the format of time is "09:20:59 AM" ......the problem is i want the hour doesnt exceed from 23 n minute n seconds doesnt exceed from 59......i want hour to be 00 after 23 n minutes n seconds to be 00 after 59......
    please help me.......
    thanx
    i m using text box to save data in table of sql server 2000 ...when the data is getting save it is also adding to the list box......i want the data not to be saved again if it is present in list box once
    thanx
    mishi

  2. #2
    Join Date
    Sep 2003
    Location
    Pakistan, Karachi
    Posts
    22

    Re: i m using vb 6.0 n sqlserver 2000

    Originally posted by mishi
    hi
    i m using masked text box to save time in tableof sqlserver 2000........the format of time is "09:20:59 AM" ......the problem is i want the hour doesnt exceed from 23 n minute n seconds doesnt exceed from 59......i want hour to be 00 after 23 n minutes n seconds to be 00 after 59......
    please help me.......
    thanx

    You can say a command like if min or hour greater than 59 and 23 it shoud go to zero I hope u understand.....

    if (min>59)
    {
    Datepart.Min=00
    }

    and

    if(hour>23)
    {
    DatePart.hour=00
    }


    I have not worked very much on VB I am a frequent worker on C# so the syntax might need to change.. so please look into it.. I hope this resolves your problem Do message me if your problem is solved.

    Regards

    Bye
    Shani

Posting Permissions

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