date displaly (Full Version)

All Forums >> [Web Development] >> ASP and Database



Message


kitty6 -> date displaly (4/7/2008 12:15:48)

I'm using the following code below to produce:
LOL080004344760

How can I make it read the month, day and year plus the ten digit timer? So it would look like this:
LOL0407080004538754

Thanks.

LOL<%'=right(datepart("yyyy",Date()),2) & (timer()*100)%><%=right(datepart("yyyy",Date()),2) & left("0000000000",(10-len(timer()*100))) & (timer()*100)%>




Spooky -> RE: date displaly (4/7/2008 15:17:10)

Im trying to work out which parts which :)What would the same number look like with the date and without the date?




kitty6 -> RE: date display (4/7/2008 19:47:44)

Sorry about that.

Right now, it looks like this: LOL080004344760
It has the LOL + 08(year) + the ten digit number

I would like it to look like this: LOL0407080004344760
LOL + 04(month) + 07(day) + 08(year) + the ten digit number

Does that sense?

Thanks.






Spooky -> RE: date display (4/7/2008 20:24:20)

Something like this should work :

LOL<%= right("0" & month(now),2) & right("0" & day(now),2) & right(year(now),2) & left("0000000000",(10-len(timer()*100))) & (timer()*100)%>




kitty6 -> RE: date display (4/7/2008 21:48:27)

That worked perfect!

Thank You very much.




Page: [1]

Valid CSS!




Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI
0.0625