Generating Code in Dept-001/Fin.Year Format
-
Hi guys., I had a kind of requirement where i will select my department in ddl and click on save button.,then the code should be saved in the format of selected department-S.no/Fin.Year. For Eg: If i select my Dept name as IT and my current financial year is
2012-04-01 2013-03-31
then output should be in the format of
IT-00001 / 12-13
(Dept-S.no/Fin.Year)if a save one more record then,
output should be
IT-00002 / 12-13
If my Fin.Year changed to
2013-04-01 2014-03-31
then again the o/p should be
IT-00001 / 13-14
-
Hi guys., I had a kind of requirement where i will select my department in ddl and click on save button.,then the code should be saved in the format of selected department-S.no/Fin.Year. For Eg: If i select my Dept name as IT and my current financial year is
2012-04-01 2013-03-31
then output should be in the format of
IT-00001 / 12-13
(Dept-S.no/Fin.Year)if a save one more record then,
output should be
IT-00002 / 12-13
If my Fin.Year changed to
2013-04-01 2014-03-31
then again the o/p should be
IT-00001 / 13-14
-
Hi guys., I had a kind of requirement where i will select my department in ddl and click on save button.,then the code should be saved in the format of selected department-S.no/Fin.Year. For Eg: If i select my Dept name as IT and my current financial year is
2012-04-01 2013-03-31
then output should be in the format of
IT-00001 / 12-13
(Dept-S.no/Fin.Year)if a save one more record then,
output should be
IT-00002 / 12-13
If my Fin.Year changed to
2013-04-01 2014-03-31
then again the o/p should be
IT-00001 / 13-14
As Eddy said, you really should ask a question you want answered rather than state a problem. Try looking into string concatenation, you are going to have to
CAST
orCONVERT
the datetime and int into varchar values and concatenate them!Never underestimate the power of human stupidity RAH