Jump to content

[solved]_DayValueToDate returns nothing with string varable


 Share

Recommended Posts

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 by Datus

We live as we dream alone!

Link to comment
Share on other sites

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

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...