[thelist] Friday Freebie

Daniel J. Cody djc at five2one.org
Fri Aug 25 16:47:42 CDT 2000


Slow day :) :
http://freebeer@evolt.org/
http://sexydevelopers@evolt.org/

<tip type="Date formatting">
If you're having problems formatting dates with the app server of your
choice, consider using the native functions of your database to do the
work for you.

For example, I was having a bitch of a time getting a date field from a
cold fusion POP query.. CF would just not parse it.. So, instead, I
passed the string to Oracle and used an oracle funtion to convert the
string as it was inserting it like so:

insert into dan beer, martini, time_drank values('Bass', 'Manhatten',
to_date(Friday, Aug 25 2000 5:00:00PM, 'dd-mmm-yyyy'))

the 'to_date' function will take any(almost) string and convert it into
a date format that your DB, oracle in this case, will recognize.

Any time you can offload work to your DB server and let your app server
rest, Its A Good Thing(tm)
</tip>

.djc.





More information about the thelist mailing list