Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Createodbcdate change date why???

Status
Not open for further replies.

romariorr

Programmer
Sep 30, 2002
1
0
0
PS
Hi all

I use function CreateODBCDate(form.y)
The problem:
When the day in date greater than 10 no problem as 15/08/2002 print in DB as 15/08/2002
but when the day in date less or equal ten (as 10/08/2002) print in DB as 08/10/2002

Thanks for all
 
The standard format (as far as CFML is concerned) is:

month/day/year (not day/month/year as you have)

You could use LSDateFormat() or simply get used to the "US" format.

<!---DateFormat.cfm--->
<cfoutput>
Here is a list of 'Locales' you can use to format dates <br>
<br>
<br>
<cfloop list=#Server.ColdFusion.SupportedLocales# index=index>
#index#<br>
</cfloop>


<hr>This is what the different date formats look like... <br>

<cfloop list=#Server.ColdFusion.SupportedLocales# index=index>

<cfset temp=SetLocale(index)>
#GetLocale()# <br>


#LSDateFormat(Now(), 'mmm-dd-yyyy')# #LSTimeFormat(Now())# <br>
#LSDateFormat(Now(), 'mmmm d, yyyy')# #LSTimeFormat(Now())#<br>
#LSDateFormat(Now(), 'mm/dd/yyyy')# #LSTimeFormat(Now())# <br>
#LSDateFormat(Now(), 'd-mmm-yyyy')# #LSTimeFormat(Now())# <br>
#LSDateFormat(Now(), 'ddd, mmmm dd, yyyy')# #LSTimeFormat(Now())#<br>
#LSDateFormat(Now(), 'd/m/yy')# #LSTimeFormat(Now())# <br>
#LSDateFormat(Now())# #LSTimeFormat(Now())# <br>
<br><br>
</cfloop>
</cfoutput>

<!---EOF--->
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top