RE: creating a timestamp

RE: creating a timestamp

 

  

Is there a db2 command to convert a DB2 date (YYYY-MM-DD) to a Julian
date (YYYYDDD)?

-----Original Message-----
From: Joanna Grossman
[mailto:db2udbdba-ezmlmshield-x36775075.[Email address protected]
Sent: Monday, March 24, 2008 2:57 PM
To: LazyDBA Discussion
Subject: Re: creating a timestamp

THANKS!

Tom Flaherty wrote:
> By DOY do you mean Julian Date?
>
> select date('YYYYJJJ') from sysibm.sysdummy1;
>
> YYY = Year, e.g 2008
> JJJ = Julian Day of Year (e.g. 001 -> 365/6)
>
>
> Tom Flaherty
> Birch Hill Technology Group, Inc.
> www.birchhillgroup.com
>
>
> -----Original Message-----
> From: Joanna Grossman
> [mailto:db2udbdba-ezmlmshield-x69577844.[Email address protected]
> Sent: Monday, March 24, 2008 3:27 PM
> To: LazyDBA Discussion
> Subject: Re: creating a timestamp
>
> What I really need to do is find a way to covert DOY to a date.
>
> Kale Abhishek wrote:
>
>> **A LazyDBA.com subscriber has responded to your lazydba.com post**
>> **LazyDBA.com mail shield has forwarded you this email, **and removed

>> any attachments, and kept your email address secret **from this
>> person, and any viruses/trojans.
>> **If you reply to this email, the person will see your email address
>> as
>>
> normal
>
>> **Anything below this line is the original email text
>>
>>
>> Hi Joanna,
>>
>> I am not sure if you have a DB2 function to create a timestamp out of

>> DOY, YEAR and TIME.
>> I think you can create a function on your own with the below SQL
>> select cast(current date as char(10)) || cast ('-' as char) ||
>> cast(current time as char(8)) || cast ('.' as char) || cast ('000000'

>> as char (6))
>> as Time_stamp from sysibm.sysdummy1
>>
>> This query will return ZEROES in the nano seconds part of the
timestamp.
>>
>> Please let me know if this helps.
>>
>> Regards,
>> Abhishek.
>>
>> -----Original Message-----
>> From: Joanna Grossman
>> [Email address protected]
>> Sent: Friday, March 21, 2008 1:53 AM
>> To: LazyDBA Discussion
>> Subject: creating a timestamp
>>
>> Is there a function to create a timestamp from a DOY, YEAR, and a
TIME?
>>
>> JG
>>
>>
>>
>> ---------------------------------------------------------------------
>> TO REPLY TO EVERBODY , PLEASE CLICK REPLY-ALL, NOT JUST REPLY To post

>> a dba job: http://jobs.lazydba.com To Subscribe :
>> http://www.LazyDBA.com To unsubscribe:
>> http://www.lazydba.com/unsubscribe.html
>>
>>
>>
>> -----Message Disclaimer-----
>>
>> This e-mail message is intended only for the use of the individual or

>> entity to which it is addressed, and may contain information that is
>> privileged, confidential and exempt from disclosure under applicable
law.
>> If you are not the intended recipient, any dissemination,
>> distribution or copying of this communication is strictly prohibited.

>> If you have received this communication in error, please notify us
>> immediately by reply email to [Email address protected] and delete or

>> destroy all copies
>>
> of
>
>> the original message and attachments thereto. Email sent to or from
>> the Principal Financial Group or any of its member companies may be
>> retained as required by law or regulation.
>>
>> Nothing in this message is intended to constitute an Electronic
>> signature for purposes of the Uniform Electronic Transactions Act
>> (UETA) or the Electronic Signatures in Global and National Commerce
>> Act ("E-Sign") unless a specific statement to the contrary is
included in this message.
>>
>> While this communication may be used to promote or market a
>> transaction or an idea that is discussed in the publication, it is
>> intended to provide general information about the subject matter
>> covered and is provided with the understanding that The Principal is
>> not rendering legal, accounting, or tax advice. It is not a marketed
>> opinion and may not be used to avoid penalties under the Internal
>> Revenue Code. You should consult with appropriate counsel or other
>> advisors on all matters pertaining to legal, tax, or accounting
obligations and requirements.
>>
>>
>>
>>
>
>

--
joanna grossman
web & data manager
vermont monitoring coop
www.uvm.edu/vmc



---------------------------------------------------------------------
TO REPLY TO EVERBODY , PLEASE CLICK REPLY-ALL, NOT JUST REPLY
To post a dba job: http://jobs.lazydba.com
To Subscribe : http://www.LazyDBA.com
To unsubscribe: http://www.lazydba.com/unsubscribe.html



*******************************
The information contained in this message may be privileged and/or confidential and protected from disclosure. If the reader of this message is not the intended recipient, or an employee or agent responsible for delivering this message to the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. Note that any views or opinions presented in this message are solely those of the author and do not necessarily represent those of Ameren. All emails are subject to monitoring and archival. Finally, the recipient should check this message and any attachments for the presence of viruses. Ameren accepts no liability for any damage caused by any virus transmitted by this email. If you have received this in error, please notify the sender immediately by replying to the message and deleting the material from any computer. Ameren Corporation
*******************************



DB2 & UDB email list listserv db2-l LazyDBA home page