Wrox Home  
Search P2P Archive for: Go

  Return to Index  

aspx_beginners thread: Pulling parts of a date from a SQL table using VB


Message #1 by "Joseph Janick" <joseph_janick@u...> on Tue, 11 Feb 2003 15:54:19
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?
Message #2 by "Peter Lanoie" <planoie@n...> on Tue, 11 Feb 2003 15:09:34 -0500
Pull your values from SQL, then use the DatePart() VB methods to grab that
desired parts of the date from the value returned in the SQL fields.

-----Original Message-----
From: Joseph Janick [mailto:joseph_janick@u...]
Sent: Tuesday, February 11, 2003 15:54
To: aspx_beginners
Subject: [aspx_beginners] 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?


  Return to Index