|
-
Feb 10th, 2003, 05:45 PM
#1
Thread Starter
Junior Member
Pulling parts of a date from a SQL table using VB
I've got two date fields in a SQL table, dateStarted and dateEnded. I'm trying to pull the day, month and year info from them into separate ASP textboxes (i.e. txtMth, txtDay, txtYear, txtMth2, txtDay2, txtYear2) using VB. Assuming I've already opened the SQL connection how would I proceed to populate the textboxes w/ the days, months, and years separately?
"Ignorance and prejudice and fear walk hand in hand" - 'Witch Hunt', by Rush
-
Feb 12th, 2003, 01:11 PM
#2
Hyperactive Member
Retreive the data into a Date variable type, and there should be some methods you can use to extract day,month,year, etc...
Or retrieve date into a String, and use the Split() method to seperate the parts.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|