You need to sign in to do that
Don't have an account?
huniverse
put current DateTime on page
Hi
I want to display current Date and time on apex page. currently i am using following code
Task t = new Task();
Date myDate = Date.Today();
DateTime d = t.activityDate;
public Task getTask() { return t; }
<apex:inputField id="PutDate" value="{!task.activityDate}"/>
it shows calender and current Date. I require to display date and time 12/16/2010 08:10 PM
Kindly suggest any idea, code , links.
Thanks in advance.
For visual force page you can use NOW() function to show current date & time.
<apex:outputText value=”{!NOW()}”/>
Thanks for reply.
I want to display date time in input field. currently it display date only. My question is how to display date and time both
e.g., 12/17/2010 HH:MM like format in inputfield. Please suggest any idea.
Thanks in advance