PDA

View Full Version : VB's time functions


mihai11
07-14-2007, 12:52 PM
Hi,

I am developing a custom page and I want to display the time when a thread was created. The creation time is available in the field "dateline" from table "thread". I could very easily read the time & display it, but I want to format it nicely, the way VB is doing it. Time formatted by VB may look like this:

"Yesterday at 3:44 pm."

What VB functions do I need to use to properly format the time ?

Regards,
Razvan M.

Guest190829
07-14-2007, 01:01 PM
Take a look at vbdate()

mihai11
07-14-2007, 01:30 PM
I did something like this:


$story_date = vbdate($vbulletin->options['dateformat'], $date_line, true) ;
$story_time = vbdate($vbulletin->options['timeformat'], $date_line);


and it is working. Thank you.