Adobe Experience League
Community
cancel
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
Showing results for
Show
only
|
Search instead for
Did you mean:
Sign In
Search
Sign In
Adobe Experience Manager
Adobe Campaign Classic
Adobe Campaign Standard
Adobe Experience Platform
Adobe Analytics
Adobe Audience Manager
Adobe Target
Adobe Experience Cloud
Adobe I/O Cloud Extensibility
Adobe Advertising Cloud
Marketo
Magento
Adobe Creative Cloud
Adobe Document Cloud
Workfront, an Adobe company
Community
Adobe Experience Manager
Adobe LiveCycle
Discussions
Community
Adobe Experience Manager
Adobe LiveCycle
Discussions
JavaScript :: Date & TIME
Luigi_247_365
Luigi_247_365
Luigi_247_365
11-11-2008
Mark as New
Follow
Mute
Subscribe to RSS Feed
Permalink
Print
Email to a Friend
Report
Hi,
I know this is elemental, but here goes:
Can somebody please give me some handy script/objects for DATE & TIME!
Example: Set a Date/Time field to the Date & TIME now! (Javascript only please)
Date.getDate()
now()
????
Replies
Luigi_247_365
Luigi_247_365
Luigi_247_365
11-11-2008
Mark as New
Follow
Mute
Subscribe to RSS Feed
Permalink
Print
Email to a Friend
Report
var d = new Date();
orderDate.rawValue = d.toString();
Luigi_247_365
Luigi_247_365
Luigi_247_365
11-11-2008
Mark as New
Follow
Mute
Subscribe to RSS Feed
Permalink
Print
Email to a Friend
Report
For my peeps...
JAVASCRIPT
var d, s;
s = "";
d = new Date();
s += "" + d.getFullYear() + "/";
s += "" + zeroPad(d.getMonth() + 1) + "/";
s += "" + zeroPad(d.getDate());
s += " ";
s += "" + zeroPad(d.getHours()) + ":";
s += "" + zeroPad(d.getMinutes()) + ":";
s += "" + zeroPad(d.getSeconds());
this.rawValue = s;
var str;
function zeroPad(intVal)
{
str = "" + intVal;
if (intVal < 10)
{
str = "0" + intVal;
}
return str;
}