You could write a function to return the correct string in one shot

function date_time(tmpVar){
        
        New_DateTime= DateFormat(tmpVar, "yyyy-mm-dd") & " " &
TimeFormat(tmpVar, "hh:mm:ss");

        return New_DateTime;
};

-----Original Message-----
From: Sam Roach [mailto:[EMAIL PROTECTED]]
Sent: Monday, January 27, 2003 4:17 PM
To: CF-Talk
Subject: RE: DateTimeFormat


Not in one shot but you can do something like:
<CFSET MYDATETIME = #DateFormat("#Now()#", "yyyy-mm-dd")# & " " &
#TimeFormat("#Now()#", "hh:mm:ss")#>

-- Sam


-----Original Message-----
From: Frank Mamone [mailto:[EMAIL PROTECTED]]
Sent: Monday, January 27, 2003 1:10 PM
To: CF-Talk
Subject: DateTimeFormat


Hi,

I looked at all the functions but can't seem to find a CF function that
formats date and time in one shot.

Can I change the output of  Now() directly into this format : 2003-01-27
14:54:29

Or do I have to parse out the date and time and do it separately?

Looking for a shortcut:)

Thanks



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. http://www.fusionauthority.com/ads.cfm

                                Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
                                

Reply via email to