Hello,
I have a date field and I created a Julian date field. I would like to convert the date field into Julian date field as Julian date format. Is that possible? Has anyone tried it before? Thanks!
Julian date
Re: Julian date
Hi,
maybe you can try to get the julian date from your date field MYDATE (example) with
TO_DAYS(MYDATE)+1721060
maybe you can try to get the julian date from your date field MYDATE (example) with
TO_DAYS(MYDATE)+1721060
Any help offered comes with the best of intentions. Use it at your own risk. In any case, please make a backup of your existing environment before applying any changes.
Re: Julian date
Thanks for your reply, pböttcher. Here is what I'm getting.
2459505 = 10/17/2021 (date)
SELECT TO_DAYS(date)+1721060
FROM `brine_lot`
WHERE `brine_lot`.`id`='%ID%'
2459505 = 10/17/2021 (date)
SELECT TO_DAYS(date)+1721060
FROM `brine_lot`
WHERE `brine_lot`.`id`='%ID%'
Re: Julian date
Hi,
which is correct, or what would you expect?
which is correct, or what would you expect?
Any help offered comes with the best of intentions. Use it at your own risk. In any case, please make a backup of your existing environment before applying any changes.
Re: Julian date
Yes, I'm expecting as 21290 as the answer:
10/17/2021 = 21290 (21-Year, 290-10/17)
10/17/2021 = 21290 (21-Year, 290-10/17)
Re: Julian date
Hi,
good to know what type you are looking for.
Try
good to know what type you are looking for.
Try
Code: Select all
SELECT (YEAR(date)-2000)*1000 + DAYOFYEAR(date)
FROM `brine_lot`
WHERE `brine_lot`.`id`='%ID%'
Any help offered comes with the best of intentions. Use it at your own risk. In any case, please make a backup of your existing environment before applying any changes.
Re: Julian date
Thanks, pböttcher! It worked!