Jump to content

Recommended Posts

Posted

Hi

I'm connecting to a database, running a query and pulling a date back.

Example:

SELECT max(createddate) FROM table1

In my AutoIt output I will see something like:

201107282103

I tried using the date convert in the SQL query, which works in Management Studio but not via AutoIt.

Is there any way to convert this via AutoIt?

Thanks

Posted

What format do you want to convert it to? This website lists a lot of possibilities:

http://www.sql-server-helper.com/tips/date-formats.aspx

#include <ByteMe.au3>

Posted

What format do you want to convert it to? This website lists a lot of possibilities:

http://www.sql-server-helper.com/tips/date-formats.aspx

I don't believe it.... I was on this exact page earlier trying the conversions and thought they werent working in AutoIt. I must've been doing something wrong as it worked in Management Studio. DOH!

Tried again and bingo, it's working.

Thanks :)

Posted

I don't believe it.... I was on this exact page earlier trying the conversions and thought they werent working in AutoIt. I must've been doing something wrong as it worked in Management Studio. DOH!

Tried again and bingo, it's working.

Thanks :)

You weren't holding your tongue right. ;)

#include <ByteMe.au3>

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...