Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re: Converting datetime formats

by jonadab (Parson)
on Apr 25, 2008 at 12:33 UTC ( #682805=note: print w/ replies, xml ) Need Help??


in reply to Converting datetime formats

I assume you know how to get information from the database using DBD::ODBC or some equivalent mechanism. If not, ask that question specifically.

For converting dates between formats, I normally use DateTime and the various modules in the DateTime::Format:: namespace. However, I have not yet found one that exactly implements the datetime format of MS SQL Server. (That doesn't necessarily mean there isn't one; only that I haven't found one.) It's similar to the MySQL datetime format, but not identical. So I ended up rolling my own function using sprintf. I don't have it here (at home), because I don't have MS SQL Server here, only at work. At home I use mostly MySQL, though I keep meaning to get into Postgres.

-- 
We're working on a six-year set of freely redistributable Vacation Bible School materials.


Comment on Re: Converting datetime formats

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://682805]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (6)
As of 2015-07-03 16:58 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (54 votes), past polls