dbTalk Databases Forums  

SQLDTS Date Offset function

microsoft.public.sqlserver.dts microsoft.public.sqlserver.dts


Discuss SQLDTS Date Offset function in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
slugfest
 
Posts: n/a

Default SQLDTS Date Offset function - 11-04-2004 , 02:49 PM






I'm using the SQLDTS FTP Task and sm trying to use the date offset
function to grab files from a dated folder. The source is
"/Pictures/(dated folder)". The dated folder is in this format
mmddyyyy or 11042004. What I am trying to do is set up the FTP task to
grab the files from the PREVIOUS day's dated folder...which is why I
need the date offset function.

The example on www.sqldts.com gives this...

Similarly a format of FilePrefix_<dd_mm_yyyy>.txt would result in
FilePrefix_30_11_2002. If you combine this with the date offset of
-86400 this will translated to FilePrefix_26_11_2002.log.

But that isn't clear to me.

Any help is appreciated.

Reply With Quote
  #2  
Old   
Darren Green
 
Posts: n/a

Default Re: SQLDTS Date Offset function - 11-04-2004 , 05:30 PM






In message <a6b91807.0411041249.35d6d5a8 (AT) posting (DOT) google.com>, slugfest
<bh_parker (AT) hotmail (DOT) com> writes
Quote:
I'm using the SQLDTS FTP Task and sm trying to use the date offset
function to grab files from a dated folder. The source is
"/Pictures/(dated folder)". The dated folder is in this format
mmddyyyy or 11042004. What I am trying to do is set up the FTP task to
grab the files from the PREVIOUS day's dated folder...which is why I
need the date offset function.

The example on www.sqldts.com gives this...

Similarly a format of FilePrefix_<dd_mm_yyyy>.txt would result in
FilePrefix_30_11_2002. If you combine this with the date offset of
-86400 this will translated to FilePrefix_26_11_2002.log.

But that isn't clear to me.

Any help is appreciated.
The date offset is a value in seconds that is added to the current
date/time. The current date/time is substituted at runtime as defined by
the format which must be enclosed in <>.

Try -

/Pictures/<mmddyyyy>

and a value of -86400.

(I think there is a mistake with the quote example, so I'll check that
out.)


--
Darren Green (SQL Server MVP)
DTS - http://www.sqldts.com

PASS - the definitive, global community for SQL Server professionals
http://www.sqlpass.org



Reply With Quote
  #3  
Old   
slugfest
 
Posts: n/a

Default Re: SQLDTS Date Offset function - 11-05-2004 , 09:26 AM



Darren Green <darren.green (AT) reply-to-newsgroup-sqldts (DOT) com> wrote

Quote:
In message <a6b91807.0411041249.35d6d5a8 (AT) posting (DOT) google.com>, slugfest
bh_parker (AT) hotmail (DOT) com> writes
I'm using the SQLDTS FTP Task and sm trying to use the date offset
function to grab files from a dated folder. The source is
"/Pictures/(dated folder)". The dated folder is in this format
mmddyyyy or 11042004. What I am trying to do is set up the FTP task to
grab the files from the PREVIOUS day's dated folder...which is why I
need the date offset function.

The example on www.sqldts.com gives this...

Similarly a format of FilePrefix_<dd_mm_yyyy>.txt would result in
FilePrefix_30_11_2002. If you combine this with the date offset of
-86400 this will translated to FilePrefix_26_11_2002.log.

But that isn't clear to me.

Any help is appreciated.

The date offset is a value in seconds that is added to the current
date/time. The current date/time is substituted at runtime as defined by
the format which must be enclosed in <>.

Try -

/Pictures/<mmddyyyy

and a value of -86400.

(I think there is a mistake with the quote example, so I'll check that
out.)
Darren,
In terms of the GUI interface of your SQLDTS Task, where do I place
the value -86400? Is it something like this...

/Pictures/<mmddyyyy-86400>

OR

Is it a separate field all together?

Thanks.


Reply With Quote
  #4  
Old   
Darren Green
 
Posts: n/a

Default Re: SQLDTS Date Offset function - 11-05-2004 , 01:08 PM



In message <a6b91807.0411050726.377057be (AT) posting (DOT) google.com>, slugfest
<bh_parker (AT) hotmail (DOT) com> writes
Quote:
Darren Green <darren.green (AT) reply-to-newsgroup-sqldts (DOT) com> wrote in
message news:<NlLj7KDXuriBFwdo (AT) sqldts (DOT) com>...
In message <a6b91807.0411041249.35d6d5a8 (AT) posting (DOT) google.com>, slugfest
bh_parker (AT) hotmail (DOT) com> writes
I'm using the SQLDTS FTP Task and sm trying to use the date offset
function to grab files from a dated folder. The source is
"/Pictures/(dated folder)". The dated folder is in this format
mmddyyyy or 11042004. What I am trying to do is set up the FTP task to
grab the files from the PREVIOUS day's dated folder...which is why I
need the date offset function.

The example on www.sqldts.com gives this...

Similarly a format of FilePrefix_<dd_mm_yyyy>.txt would result in
FilePrefix_30_11_2002. If you combine this with the date offset of
-86400 this will translated to FilePrefix_26_11_2002.log.

But that isn't clear to me.

Any help is appreciated.

The date offset is a value in seconds that is added to the current
date/time. The current date/time is substituted at runtime as defined by
the format which must be enclosed in <>.

Try -

/Pictures/<mmddyyyy

and a value of -86400.

(I think there is a mistake with the quote example, so I'll check that
out.)

Darren,
In terms of the GUI interface of your SQLDTS Task, where do I place
the value -86400? Is it something like this...

/Pictures/<mmddyyyy-86400

OR

Is it a separate field all together?

Thanks.
The offset goes on the second tab "File filter date offset (seconds):"

Cheers

--
Darren Green (SQL Server MVP)
DTS - http://www.sqldts.com

PASS - the definitive, global community for SQL Server professionals
http://www.sqlpass.org



Reply With Quote
  #5  
Old   
slugfest
 
Posts: n/a

Default Re: SQLDTS Date Offset function - 12-01-2004 , 05:21 PM



Darren Green <darren.green (AT) reply-to-newsgroup-sqldts (DOT) com> wrote

Quote:
In message <a6b91807.0411050726.377057be (AT) posting (DOT) google.com>, slugfest
bh_parker (AT) hotmail (DOT) com> writes
Darren Green <darren.green (AT) reply-to-newsgroup-sqldts (DOT) com> wrote in
message news:<NlLj7KDXuriBFwdo (AT) sqldts (DOT) com>...
In message <a6b91807.0411041249.35d6d5a8 (AT) posting (DOT) google.com>, slugfest
bh_parker (AT) hotmail (DOT) com> writes
I'm using the SQLDTS FTP Task and sm trying to use the date offset
function to grab files from a dated folder. The source is
"/Pictures/(dated folder)". The dated folder is in this format
mmddyyyy or 11042004. What I am trying to do is set up the FTP task to
grab the files from the PREVIOUS day's dated folder...which is why I
need the date offset function.

The example on www.sqldts.com gives this...

Similarly a format of FilePrefix_<dd_mm_yyyy>.txt would result in
FilePrefix_30_11_2002. If you combine this with the date offset of
-86400 this will translated to FilePrefix_26_11_2002.log.

But that isn't clear to me.

Any help is appreciated.

The date offset is a value in seconds that is added to the current
date/time. The current date/time is substituted at runtime as defined by
the format which must be enclosed in <>.

Try -

/Pictures/<mmddyyyy

and a value of -86400.

(I think there is a mistake with the quote example, so I'll check that
out.)

Darren,
In terms of the GUI interface of your SQLDTS Task, where do I place
the value -86400? Is it something like this...

/Pictures/<mmddyyyy-86400

OR

Is it a separate field all together?

Thanks.

The offset goes on the second tab "File filter date offset (seconds):"

Cheers
Darren,
When I use the File Filter, it is applied to both the Source and
Destination. Is there a way to apply it ONLY to the Source?

Thanks.


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.