Heather McVay
Heather McVay

Reputation: 949

How do I get a time stamp with ASP Classic from code?

I am using:

<%= time %>

It's returning:

5:12:19

And it's 8:12:19 p.m. where I am

How can I make it print the local time?

Upvotes: 0

Views: 3792

Answers (2)

Heather McVay
Heather McVay

Reputation: 949

<% myDateTime = DateAdd("h", 3, Time) %>

Upvotes: 0

Jan Hansen
Jan Hansen

Reputation: 303

You have to set the LocaleId (Session.LCID or SetLocale(lcid)) for your own timezone before calling time. See more about SetLocale and LocaleIDs on this page

Upvotes: 2

Related Questions