OVH Cloud OVH Cloud

ins?rer une date

1 réponse
Avatar
guev
Bonjour, comment dois-je faire pour ins?rer la date du jour dans une page coldfusion. existe t-il une fonction comme dans php ? merci de votre aide. guev

1 réponse

Avatar
Christian Gayton
euuuhhh
and now() faudrait voir à regarder un peu la doc stp :)
si t'as dreamweaver c'est ctrl+f1

The following example uses the LSDateFormat() function to display the
current date in the formats for each locale supported by ColdFusion:

<!--- This example shows LSDateFormat --->
<html>
<head>
<title>LSDateFormat Example</title>
</head>
<body>
<h3>LSDateFormat Example</h3>
<p>Format the date part of a date/time value using the locale convention.
<!--- loop through a list of locales; show date values for Now()--->
<cfloop list = "#Server.Coldfusion.SupportedLocales#"
index = "locale" delimiters = ",">
<cfset oldlocale = SetLocale(locale)>

<cfoutput><p><B><I>#locale#</I></B><br>
#LSDateFormat(Now(), "mmm-dd-yyyy")#<br>
#LSDateFormat(Now(), "mmmm d, yyyy")#<br>
#LSDateFormat(Now(), "mm/dd/yyyy")#<br>
#LSDateFormat(Now(), "d-mmm-yyyy")#<br>
#LSDateFormat(Now(), "ddd, mmmm dd, yyyy")#<br>
#LSDateFormat(Now(), "d/m/yy")#<br>
#LSDateFormat(Now())#<br>
<hr noshade>
</cfoutput>
</cfloop>
</body>
</html>