mkeevil,
the code I posted is a 1-liner that you can put right into your derivation in a TRANSform stage. Is that sufficient?
Unix TimeStamp Convert
Moderators: chulett, rschirm, roy
<a href=http://www.worldcommunitygrid.org/team/ ... TZ9H4CGVP1 target="WCGWin">
</a>
</a>
Ok so I created the function and a test batch.... I was just told though that the input date will be differnt, it will be '19-04-2005 00:00:00' so I would have to change the function to be
Ans = (iconv(datepiece,"D-DMY[,A3,]") - iconv("1 jan 1970","D"))
DEFFUN UnixTime(DateIn) Calling "DSU.UnixTime"
DateIn = '19-04-2005 00:00:00'
Result = UnixTime(DateIn)
Call DSLogInfo("Input Date: ":DateIn,"Batch::UnixConvertTest")
Call DSLogInfo("Converted: ":Result,"Batch::UnixConvertTest")
Ans = (iconv(datepiece,"D-DMY[,A3,]") - iconv("1 jan 1970","D"))
DEFFUN UnixTime(DateIn) Calling "DSU.UnixTime"
DateIn = '19-04-2005 00:00:00'
Result = UnixTime(DateIn)
Call DSLogInfo("Input Date: ":DateIn,"Batch::UnixConvertTest")
Call DSLogInfo("Converted: ":Result,"Batch::UnixConvertTest")
-
- Participant
- Posts: 3337
- Joined: Mon Jan 17, 2005 4:49 am
- Location: United Kingdom
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact: