ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » What week is it?

Post new topic  Reply to topic
 What week is it? « View previous topic :: View next topic » 
Author Message
Boolean
PostPosted: Wed Mar 24, 2004 3:44 am    Post subject: What week is it? Reply with quote

Acolyte

Joined: 05 Jun 2003
Posts: 56
Location: Sweden

Does some one know if it's possible to get the week number from a date in WBI MB?

I.e. Given a date, I want to extract the week number of the year.
_________________
/ Boolean
Back to top
View user's profile Send private message
wooda
PostPosted: Tue Mar 30, 2004 5:02 am    Post subject: Reply with quote

Master

Joined: 21 Nov 2003
Posts: 265
Location: UK

It's not possible using ESQL functions.

However the MRM datetime handling can write out or parse a datefield in a format that includes week numbers.
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Tue Mar 30, 2004 5:07 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

wooda wrote:
It's not possible using ESQL functions.

However the MRM datetime handling can write out or parse a datefield in a format that includes week numbers.

I think you mean that there is no predefined ESQL function for calculating the week number.

It should be relatively simple to write a custom ESQL function that will calculate the week number.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
wooda
PostPosted: Tue Mar 30, 2004 6:28 am    Post subject: Reply with quote

Master

Joined: 21 Nov 2003
Posts: 265
Location: UK

Indeed that is exactly what I meant.
Thankyou for your excellent clarification.
Back to top
View user's profile Send private message
Boolean
PostPosted: Tue Mar 30, 2004 10:41 pm    Post subject: Reply with quote

Acolyte

Joined: 05 Jun 2003
Posts: 56
Location: Sweden

We have written a plugin for this purpose, but it should be much more handy to deal with this the ESQL way.

I'm not that familiar with the date functions though and am a little uneasy if I can get this bullet proof or not. Are there anyone out there, that can give me a hint?
_________________
/ Boolean
Back to top
View user's profile Send private message
scaryjase
PostPosted: Wed Mar 31, 2004 6:55 am    Post subject: Reply with quote

Novice

Joined: 17 Jul 2003
Posts: 22

it all depends upon what you mean by "week number" really. Do you mean

((the number of days since Jan 1st) DIV 7) + 1

or do you mean

(the number of Sundays since Jan 1st) + 1

one is easier than the other...
_________________
scary
Back to top
View user's profile Send private message MSN Messenger
scaryjase
PostPosted: Wed Mar 31, 2004 7:10 am    Post subject: Reply with quote

Novice

Joined: 17 Jul 2003
Posts: 22

The page below relates to Excel, but gives a good outline of the issues...

http://www.cpearson.com/excel/weeknum.htm
_________________
scary
Back to top
View user's profile Send private message MSN Messenger
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » What week is it?
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.