P poppy Apr 25, 2005 #1 Does anyone know how I can get an integer from a date representing the day of the month ? TIA
B Brian Patterson Apr 25, 2005 #2 string dateString = "10/7/1973"; DateTime dt = DateTime.Parse(dateString); int day = dt.Day; Is this what you are talking about? - Brian
string dateString = "10/7/1973"; DateTime dt = DateTime.Parse(dateString); int day = dt.Day; Is this what you are talking about? - Brian
L Lucas Tam Apr 25, 2005 #3 Does anyone know how I can get an integer from a date representing the day of the month ? Click to expand... Day() or Weekday() - depending on what you want : )
Does anyone know how I can get an integer from a date representing the day of the month ? Click to expand... Day() or Weekday() - depending on what you want : )
G Guest Apr 25, 2005 #4 Put the date in a DateTime structure and pull the day. DateTime dt = DateTime.Parse(dateString); int day = dt.Day; --- Gregory A. Beamer MVP; MCP: +I, SE, SD, DBA *************************** Think Outside the Box! ***************************
Put the date in a DateTime structure and pull the day. DateTime dt = DateTime.Parse(dateString); int day = dt.Day; --- Gregory A. Beamer MVP; MCP: +I, SE, SD, DBA *************************** Think Outside the Box! ***************************
G Gabriel Lozano-Morán Apr 25, 2005 #5 DateTime types have a property Day returning an integer representing the day of the month. Gabriel Lozano-Morán
DateTime types have a property Day returning an integer representing the day of the month. Gabriel Lozano-Morán