sql - Converting list of years to double digits -
I have a table with few hundred products at and I need to change the year from the following format
1992,1993,1994,1995
92-95
How long ago I learned from forums How the format is changing in my years since 1992-1995 but with the recent needs, I need a second field before the field and with the previous year and second digit. I was working with the ceremony made here a few weeks ago but some parts were not understood and came to the conclusion that I can not use it for this matter. Apart from this, there are singles "1984" in some years, which should look like "84-84"
I'm sure the last function is usable, but I'm not going to add in. Version as dim astrPieces () in the form of public function conversion (ByVal pInput formatting) String dim I have long long dim lngFirst long dim lngLast as long as varied varReturn In the form of as in the form of "#### - ####" then the astrPieces = Split (pInput, "-") lngFirst = CLng (astrPieces (0)) LngLast = CLNG (AstrPieces (1)) i = lngFirst for lngLast varReturn = varReturn & amp; "," & Amp; CSRT (i) Next if lane (virretan) & gt; Then after the varReturn = center (varReturn, 2) end then varReturn = pInput end then the conversion = varReturn termination function
Assuming that they will be in the word for multiple or single years in order;
Public Function ToShortYearSpan (ByVal as PInput Contributions) version ToShortYearSpan = Middle $ (pInput, as 3, 2) & amp; "-" & amp; Correct $ (pInput, 2) termination function
Comments
Post a Comment