Datus Posted April 29, 2009 Share Posted April 29, 2009 (edited) I am trying to read a file with the julian date stored. I read the date into a variable but when I pass it to _dayvaluetodate it returns nothing. Do i need a special declaration or something. $DatesFile="2454950.5";possible doesnt like string _DayValueToDate ($DatesFile , $Y, $M, $D) MsgBox(0,"date=",$Y) MsgBox(0,"date=",$M) MsgBox(0,"date=",$D) Edited April 29, 2009 by Datus We live as we dream alone! Link to comment Share on other sites More sharing options...
Juvigy Posted April 29, 2009 Share Posted April 29, 2009 You need to convert it to number Ttry: Int($DatesFile) $DatesFile=2454950.5;possible doesnt like string Int($DatesFile) _DayValueToDate ($DatesFile , $Y, $M, $D) MsgBox(0,"date=",$Y) MsgBox(0,"date=",$M) MsgBox(0,"date=",$D) Link to comment Share on other sites More sharing options...
Datus Posted April 29, 2009 Author Share Posted April 29, 2009 Thank you it worked. Wasnt sure if the .5 was needed when I looked at Int before i posted. Was looking for the old Val type command but couldnt find it. Anyway thanks again and hopefully this will help others. We live as we dream alone! Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now