Need Help for Defining new date(number) Format !

DaRTHY

Registered User.
Local time
Today, 08:22
Joined
Mar 6, 2015
Messages
90
Hi guys,

i need your Help because i dont know how shall i define my new Date or numbers.

Now "yyyyXX" this is my date "y" is year 4 digits and "XX" is my problem 2 digits.

I ll give an example,

(XX = 01....36) XX can be max 36 and min 01 of course. f. Exp. 201436 and next number shall be 201501.

the biggest problem is different of these number
with basic math 201501-201436= 65 but for me it should be 01... The Question is; How can define these ??:eek:

hope so someone can help me. :banghead:

TY
 
You mention this is a Date...however talk of 36 something.
Therefore, I suggest you expand on your thinking/logic.
 
Yes its a date. But not same as you know. (Its our job system) its doesnt matter.
Is There a solution or not. Date or number what else !
 
Store them as two fields. You will go through so much coding to try and join them together you would be better off storing them separately, as iYear and iCode. It will probably make reporting easier as well.
If you need to do maths on them it is also much simpler.
I'm guessing it's like a week number /10 day rota ?
 
Nope its not a day in fact these XX are Weeks. every month has 3 XX and 1 year 12 month totally 36 XX thats why company is using yyyyXX system. I just need to define new weeks system normally is 1 year 52 weeks but mine is 36 :D if i define this it ll be so simple
 
If you have to use those formats, then I'd be looking at creating a function to do it.
It is easy enough to split the year and months, then do the math required for your system.
 
yes i have to use this system. Its not my choice, my company wants to use it.
and they are weeks not months (doesnt matter weeks or months) "yyyyXX" only if xx come to 36 after that yyyy shall be +1
and i need to difference these 2 dates.


(PS : I dont want to use this system not for all fields.... )

Ty again
 
Last edited:
So write a function to process that format of years and weeks.

Do you just need the number of weeks between two 'dates' and be able to increment a date by a week number or a number of weeks.?
 
what you need is store dates, and to have a function that converts them into your internal periods/calendar

you could do this by a function, or by having a "companycalendar" table
 

Users who are viewing this thread

Back
Top Bottom