If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > i m using vb 6.0 n sqlserver 2000

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 04-02-04, 00:37
mishi mishi is offline
Registered User
 
Join Date: Mar 2004
Location: Pakistan
Posts: 15
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
Reply With Quote
  #2 (permalink)  
Old 04-02-04, 06:40
shani shani is offline
Registered User
 
Join Date: Sep 2003
Location: Pakistan, Karachi
Posts: 22
Re: i m using vb 6.0 n sqlserver 2000

Quote:
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
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On