Jump to content

ConfusedGrayMatter

Members
  • Posts

    2
  • Joined

  • Last visited

ConfusedGrayMatter's Achievements

Newbie

Newbie (1/7)

0

Reputation

  1. Thank You.Well, now I feel like a blockhead. Once I saw that example it clicked.In case someone else finds this thread looking for a similar answer to this kind of question, I thought I'd write a quick little block of code to perhaps make it even more simple.<%var BirthDay = String("8/10/2004");var bDate = new Date(BirthDay);var bMonth = bDate.getMonth() + 1;var bDay = bDate.getDate();var bYear = bDate.getYear();Response.Write("Birthday: " + BirthDay);Response.Write("<br>");Response.Write("Birth Month: " + bMonth);Response.Write("<br>");Response.Write("Birth Day: " + bDay);Response.Write("<br>");Response.Write("Birth Year: " + bYear);%>Results are:Birthday: 8/10/2004Birth Month: 8Birth Day: 10Birth Year: 2004 Thanks again.
  2. Besides using the substring, how do I seperate the values from this datetime datatype.I'm using an asp Jscript page to bring in the value and I am returning a date like 1/1/1900 or 12/16/2004 and I don't know how to correctly use javascript to seperate the month, day and year for use as individual variables.Thanks for your time.
×
×
  • Create New...