Splitting a variable

Results 1 to 3 of 3

Thread: Splitting a variable

  1. #1
    JustinS Guest

    Default Splitting a variable

    First off, thanks to Jason Miller for the help on encapsulating html forms =)<BR><BR>My new problem is that I need to split up the contents of a variable which contains a date in the format: mm/dd/yyyy<BR><BR>Any ideas anyone? - I&#039m sure I saw something similar somwhwere (always the way) but cannot find it =(<BR><BR>Thanks in advance,<BR><BR>Justin

  2. #2
    Join Date
    Dec 1969

    Default RE: Splitting a variable

    Use <BR>Mo=DatePart(m,YourDate)<BR>Yr=DatePart(yyyy,Yo urDate)<BR>Da=DatePart(dd,YourDate)<BR><BR>or you can use<BR><BR>Mo=Month(YourDate)<BR>Yr=Year(YourDate) <BR>Da=Day(YourDate)<BR><BR>Pretty simple.<BR><BR>Brandon<BR><BR><BR>

  3. #3
    dhasza Guest

    Default RE: Splitting a variable

    If the date you have is in a string you can use the split method in either vbscript or javascript. The method returns an array splitting the string on any character you want.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts