formating dates

Results 1 to 2 of 2

Thread: formating dates

  1. #1
    Join Date
    Dec 1969

    Default formating dates

    I&#039m trying to use "Dans Date Formating Procedure" <BR><BR> <BR><BR><BR>How would I put a date in the format Mon 31/12 18:30 ? <BR>Where do i put my date from the database? <BR>What are the % symbols for? <BR><BR><BR>I&#039m new to vbscript and don&#039t know any syntax. <BR><BR>Any help would be greatly appreciated. <BR><BR>Thanks <BR><BR>Paul

  2. #2
    Siboo Guest

    Default RE: formating dates

    Paul,<BR>The following methods might help you out.<BR>I imagine that you will have to gather the individual information then buidl a string up to have the date in that precise format. All of these are based on the system the code is executed on .<BR><BR>varTime=Time() - gets time of format HH:MM:SS a.m/p.m.<BR>varDate=Date() - gets the current date of format m/d/yy<BR><BR>To gather variables out of this use the following...<BR>intHour=Hour(varTime)<BR>intMinute =Minute(varTime)<BR>intSecond=Second(varTime)<BR>i ntYear=Year(varDate)<BR>intMonth=Month(varDate)<BR >intDay=Day(varDate)<BR><BR>intWeekday=Weekday(var Date) &#039This returns the numeric value of what day of the week that date is. i.e. Dec. 1st is Friday, it will return 6 for the following.<BR>Weekday(Date())<BR><BR><BR>Now just build your string up in the proper format.<BR>Hope this helps.<BR><BR>Siboo

Posting Permissions

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