November 29, 2005 at 2:51 pm
hello,
I was wondering if someone can help me out with the following request:
I have created a DTS package that will transfer data from one server to another, however, inside the existing data source, I have to manually specify a date.
How would I go about getting the current data (yyyy/mm/dd) using a variable?
Thanks.
-----------------------------
www.cbtr.net
.: SQL Backup Admin Tool[/url] :.
November 30, 2005 at 7:14 am
hey Luke, thanks for responding.
I have created a global variable with
Name: CurrentDate
Type: String
Value: ??????? STUMPED ???????
I am not sure what valid I should be using to get the current system date in the format of yyyy/mm/dd
-----------------------------
www.cbtr.net
.: SQL Backup Admin Tool[/url] :.
November 30, 2005 at 8:04 am
November 30, 2005 at 9:01 am
Within an ActiveX Script, you can use the following to set a global variable with the current date...
DTSGlobalVariables("myDate").Value = Date
November 30, 2005 at 9:05 am
Bellis, will that give me the yyyy/mm/dd format?
-----------------------------
www.cbtr.net
.: SQL Backup Admin Tool[/url] :.
November 30, 2005 at 9:24 am
Whenever I run it I get... 11/30/2005
but this may be due to system settings. I'm sure you can format it however you want it.
You can force the YYYY/MM/DD format with...
DTSGlobalVariables("myStartDate").Value =
Year(Date) & "/" & Month(Date) & "/" & Day(Date)
November 30, 2005 at 9:31 am
thanks, I will give it a shot later this afternoon.
-----------------------------
www.cbtr.net
.: SQL Backup Admin Tool[/url] :.
Viewing 8 posts - 1 through 7 (of 7 total)
You must be logged in to reply to this topic. Login to reply