Jump to content
Sign in to follow this  
Datus

[solved]_DayValueToDate returns nothing with string varable

Recommended Posts

Datus

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!

Share this post


Link to post
Share on other sites
Juvigy

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)

Share this post


Link to post
Share on other sites
Datus

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!

Share this post


Link to post
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
Sign in to follow this  

×