Thursday, June 24, 2004, 12:35:50 PM, you wrote:
RR> Uwe Degenhardt wrote:
>> Hi list,
>> I want to convert the date-number-string e.g. "0804" (mmyy)
>> in a date something
>> like: 08/31/2004
>>
>> Is there a datefunction for this ?
RR> This code takes a 4 digit MMYY string and converts it to a date object
RR> for the last day of the month.
RR> - Rick
RR> <CFSET orig = "0804">
RR> <CFSET orig_date = Left(orig,2) & "/1/" & Right(orig,2)>
RR> <CFSET final_date = >
RR> <CFOUTPUT>#final_date#</CFOUTPUT>
RR> or
RR> <CFSCRIPT>
RR> function convertit(orig) {
RR> orig_date = Left(orig,2) & "/1/" & Right(orig,2);
RR> return DateAdd('d',DaysInMonth(orig_date)-1,orig_date);
RR> }
RR> </CFSCRIPT>
RR> <CFOUTPUT>#convertit("0804")#</CFOUTPUT>
RR>
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]

