Perhaps suggest ParseExact to him:
http://www.codeproject.com/KB/cs/String2DateTime.aspx
On Tue, Jan 5, 2010 at 4:14 AM, Stefan Richter ste...@flashcomguru.comwrote:
My CF app stores dates in a MySQL database which I often submit simply
using NOW() in my SQL statement. The resulting database
I would say that the client who is using your api is not using the
datetime.parse method in .net which allows you to add a culture specific
format when a string date is parsed.
the .NET parse method is an overloaded .NET method that can either take the
following forms.
Parse(String)
Date = parseDateTime(Rereplace(date, ^([0-9]{4}):([0-9]{2}):(.*)$,
\1/\2/\3));
Date = dateFormat(date, ...);
You might be able to get by with removing either parseDateTime() or the
Rereplace(), but I'm not 100% sure.
Cheers,
barneyb
-Original Message-
From: Jeff Fongemie
Jeff Fongemie said:
I've got a date-time that is goinmg to be passed to me as this:
2003:12:27 12:19:58
Can anyone suggest the best way to get that into a more friendly
format as in..
12/27/03 12:19pm ??
It obviously won't fit into standard dateformat function. Any ideas
I can come up
It changes the colons to hypens.
--Ben Doom
Jeff Fongemie wrote:
Am I missing something?
I've got:
cfset mydate=#myexifinfo.DateTimeOriginal#
Original Date:#REReplace(mydate, ^([0-9]*):([0-9]*):(.*)$,\1-\2-\3)#
This gives me exactly the same date time format as I input? The regex
what about
cfset myDate = replace(listFirst(2003:12:27 12:19:58, ), :, /,
all)
cfset myDate = createDate(listFirst(myDate, /), listGetAt(myDate, 2),
listLast(myDate, /))
cfset myTime = listLast(2003:12:27 12:19:58, )
#dateFormat(myDate, dd/mm/yy)# #timeFormat(myTime, hh:mm tt)#
Taco Fleur
6 matches
Mail list logo