tag:blogger.com,1999:blog-28160416.post3538339618015144412..comments2008-09-11T06:33:52.981-04:00Comments on Developer Notes: VBScript to convert timestamp to YYYYMMDD formatte...Thomashttp://www.blogger.com/profile/08347962976730903449noreply@blogger.comBlogger1125tag:blogger.com,1999:blog-28160416.post-72842412695304371972008-09-11T06:33:00.000-04:002008-09-11T06:33:00.000-04:00Excellent! You've just helped me out of a holeHere...Excellent! You&#39;ve just helped me out of a hole<BR/><BR/>Here&#39;s the code to do the same for hours, mins and seconds:<BR/><BR/>Function FormatHMS(timestamp)<BR/><BR/> Dim dateHour : dateHour = DatePart(&quot;h&quot;, timeStamp)<BR/> Dim dateMinute : dateMinute = DatePart(&quot;n&quot;, timeStamp)<BR/> Dim dateSecond : dateSecond = DatePart(&quot;s&quot;, timeStamp)<BR/><BR/> If dateHour &lt; 10 Then<BR/> timeString = timeString &amp; &quot;0&quot; &amp; dateHour<BR/> Else<BR/> timeString = timeString &amp; dateHour<BR/> End If<BR/><BR/> timeString = timeString &amp; &quot;:&quot;<BR/><BR/><BR/> If dateMinute &lt; 10 Then<BR/> timeString = timeString &amp; &quot;0&quot; &amp; dateMinute<BR/> Else<BR/> timeString = timeString &amp; dateMinute<BR/> End If<BR/><BR/> timeString = timeString &amp; &quot;:&quot;<BR/><BR/><BR/> If dateSecond &lt; 10 Then<BR/> timeString = timeString &amp; &quot;0&quot; &amp; dateSecond<BR/> Else<BR/> timeString = timeString &amp; dateSecond<BR/> End If<BR/><BR/> FormatHMS = timeString<BR/><BR/>End Functionrbhttp://www.blogger.com/profile/14820701014367573998noreply@blogger.com