No of days
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 92
- Joined: Wed Mar 05, 2008 4:09 am
- Location: chennai
- Contact:
No of days
Hoew derive the no of days from starting of the year to current date in datastage.
Please help on this.
Thanks,
Please help on this.
Thanks,
pradeep.v
Code: Select all
DaysSinceFromDate(TimestampToString(CurrentTimestamp(),"%yyyy-%mm-%dd"),TimestampToString(CurrentTimestamp(),"%yyyy"):'-01-01')
You are the creator of your destiny - Swami Vivekananda
-
- Participant
- Posts: 92
- Joined: Wed Mar 05, 2008 4:09 am
- Location: chennai
- Contact:
-
- Participant
- Posts: 92
- Joined: Wed Mar 05, 2008 4:09 am
- Location: chennai
- Contact:
Code: Select all
svMon=Upcase(Field(Inputdte,"-",2))
svMM=If svMon = 'JAN' Then '01' Else If svMon = 'FEB' Then '02' Else ..
svNewDt=Field(Inputdte,"-",3) : '-' : svMM : '-' Field(Inputdte,"-",1)
You are the creator of your destiny - Swami Vivekananda
-
- Participant
- Posts: 92
- Joined: Wed Mar 05, 2008 4:09 am
- Location: chennai
- Contact:
i analysed your derivation.anbu wrote:Convert your input date to yyyy-mm-dd and then use above functionCode: Select all
svMon=Upcase(Field(Inputdte,"-",2)) svMM=If svMon = 'JAN' Then '01' Else If svMon = 'FEB' Then '02' Else .. svNewDt=Field(Inputdte,"-",3) : '-' : svMM : '-' Field(Inputdte,"-",1)
It is working.
can you please let how to reterive total no of days in that month.
Thanks for your help.
Thanks much .
pradeep.v
-
- Participant
- Posts: 92
- Joined: Wed Mar 05, 2008 4:09 am
- Location: chennai
- Contact:
Ya date format is same as above but i want to is any other function to achieve like eg:DaysSinceFromDate similar to daysfromthe month.Kryt0n wrote:The date format yyyy-mmm-dd should be able to parse your input field - unless it is case sensitive but that would be silly!
That way you don't need to figure out what month it is
Thanks for the your inputs.
pradeep.v
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact: