Author |
Message
|
pcelari |
Posted: Mon Aug 17, 2009 5:16 am Post subject: how to make LocalEnvironment.File.TimeStamp local time? |
|
|
Chevalier
Joined: 31 Mar 2006 Posts: 411 Location: New York
|
I used LocalEnvironment.File.TimeStamp to assign a filename in my FileOutput node. But it contains only GMT time.
How can I make it contain local time?
I know CURRENT_TIMESTAMP provide local timestamp, but it's in the format 2009-08-17 13:11:50.537023
not the need format as 20090817_131150_537023
thanks for any insight.
 _________________ pcelari
-----------------------------------------
- a master of always being a newbie |
|
Back to top |
|
 |
pcelari |
Posted: Mon Aug 17, 2009 6:23 am Post subject: |
|
|
Chevalier
Joined: 31 Mar 2006 Posts: 411 Location: New York
|
problem solved.
I use the statement below. it works now.
set OutputLocalEnvironment.File.Name =
InputLocalEnvironment.File.Name || cast(CURRENT_TIMESTAMP AS CHAR FORMAT 'YYYYMMdd_HHmmss');
 _________________ pcelari
-----------------------------------------
- a master of always being a newbie |
|
Back to top |
|
 |
Krishna1 |
Posted: Thu Oct 14, 2010 12:15 pm Post subject: |
|
|
Newbie
Joined: 14 Oct 2010 Posts: 3
|
Where to set this property in FileOutNode.
set OutputLocalEnvironment.File.Name =
InputLocalEnvironment.File.Name || cast(CURRENT_TIMESTAMP AS CHAR FORMAT 'YYYYMMdd_HHmmss');
Please advise. |
|
Back to top |
|
 |
Vitor |
Posted: Thu Oct 14, 2010 12:22 pm Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
Krishna1 wrote: |
Where to set this property in FileOutNode.
set OutputLocalEnvironment.File.Name =
InputLocalEnvironment.File.Name || cast(CURRENT_TIMESTAMP AS CHAR FORMAT 'YYYYMMdd_HHmmss');
Please advise. |
a) Please don't reopen year old threads. Especially ones with only a tenuious connection to your question.
b) You don't set it in the FileOutput node; it's an ESQL statement.
c) If the question you meant to ask was "how do I get a time stamp on a file name by setting a property in the FileOutput node", the answer remains "you don't". _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
Krishna1 |
Posted: Thu Oct 14, 2010 5:16 pm Post subject: |
|
|
Newbie
Joined: 14 Oct 2010 Posts: 3
|
a) Please don't reopen year old threads. Especially ones with only a tenuious connection to your question.
Thanks..I'll never open old threads
b) You don't set it in the FileOutput node; it's an ESQL statement.
Can we pass OutputLocalEnvironment.File.Name to FileOutput Node, if so please let me know
c) If the question you meant to ask was "how do I get a time stamp on a file name by setting a property in the FileOutput node", the answer remains "you don't"
Thanks
Vitor,
I am new to WMB and looking help from experts like you.
Thanks |
|
Back to top |
|
 |
Vitor |
Posted: Fri Oct 15, 2010 4:08 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
Krishna1 wrote: |
Can we pass OutputLocalEnvironment.File.Name to FileOutput Node, if so please let me know |
Of course you can. It's what the original poster was doing, the thread concerned some tweaking of the format. The method is fully documented.
Krishna1 wrote: |
I am new to WMB and looking help from experts like you. |
There's a difference between help, training and spoonfeeding. This forum exists to provide the first, we're not equipted to do the second and we're just too busy to do the third.
Given that you're new, I recommend to you the threads in the Read First section (the clue is in the name). These contain not only posting tips but advice on phrasing questions & finding answers. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
Krishna1 |
Posted: Fri Oct 15, 2010 11:05 am Post subject: |
|
|
Newbie
Joined: 14 Oct 2010 Posts: 3
|
Vitor,
Thanks.
I am looking for only help |
|
Back to top |
|
 |
|