I've been making several changes to get the formula to convert over to regular dates for 2020 in date order for reports, - Function ConvertJulian(JulianDate As Long)
-
ConvertJulian = DateSerial(2000 + Int(JulianDate / 2000), 1, JulianDate Mod 2000) + 3651
-
End Function
this was working, now it's not.
You can use this expression (corrected): - TrueDate = DateSerial(Left(JulianDate, 5) \ 1000, 1,
-
Left(JulianDate, 5) Mod 1000)
or, in a query: - TrueDate: DateSerial(Left([JulianDate], 5)\1000,1,Left([JulianDate],5) Mod 1000)
What does the /0011 part mean?
8 2547
Here is the code I use: -
Public Function DateToJulian(dt As Date) As String
-
DateToJulian = Right(Year(dt), 2) & Format(DateDiff("d", DateSerial(Year(dt), 1, 0), dt), "000")
-
End Function
-
That's a weird function.
Could you provide some sample values for your JulianDate and what dates you expect these to be converted to?
I run jobs on mainframe that works with julian dates. I then ftp my reports down to a txt file. I've created Macros for each applications that have their own schedules. I need the julian dates to convert overt to regular date mm/dd/yy. I run a job that has the 365 or as 2020 has 366 days as julian dates to make sure this formula will work.
OK.
Could you please provide some sample values for your JulianDate and what dates you expect these to be converted to?
Trying to convert all 2020 dates from julian date/start time
20001/0011
20002/0011
20003/0011
20004/0011
... to convert over to the below desire result.
01/01/20
01/02/20
01/03/20
01/04/20
.... for the entire 2020 year
You can use this expression (corrected): - TrueDate = DateSerial(Left(JulianDate, 5) \ 1000, 1,
-
Left(JulianDate, 5) Mod 1000)
or, in a query: - TrueDate: DateSerial(Left([JulianDate], 5)\1000,1,Left([JulianDate],5) Mod 1000)
What does the /0011 part mean?
the /0011 is the start time of my test data so the jobs will fall out on the date and time they are expected to run.
OK. Then please mark as answered.
Sign in to post your reply or Sign up for a free account.
Similar topics
by: Num |
last post by:
Hi all,
I have to convert a J2EE date as a long ("Millis") in a .NET date as a
long ("Ticks")
In Java, currentTimeMillis, is the difference, measured in
milliseconds, between the current time...
|
by: Nimmy |
last post by:
Hi,
I have a file which has different dates, I want to scanf them as CHAR and
convert them to DATE format, how can I do this?
Thanks
|
by: stevag |
last post by:
I want to convert a custom date format of the type DD/MM/YYYY into the
RFC 822 date format in order to use it for RSS feeds. I want to do this
transformation into an XSLT transformation which is...
|
by: TofuTheGreat |
last post by:
I'm using "Now.ToOADate" for a record timestamp in a small database app
(it's what I want to do so don't try to disuade me ;-D).
Anyway. I store the value of Now.ToOADate in a string field in...
|
by: jimmybaba |
last post by:
hi all i am newly graduate and started my first job.......i am geting problem to convert datetime into date only , i am trying to get values from sqlserver table with comparison of date. i am using...
|
by: iffizin |
last post by:
how to convert character to date. writetime is character data type.
i want to have CPU utilization of last 24 hrs. for time being i want to have result from 1 server.
select...
|
by: Artie |
last post by:
Hi,
I have a date field stored as an INT and need to convert to a date format
mm/dd/yyyy. I'm having trouble determining what the starting date is.
min(date) = 730395
max(date) = 733189
...
|
by: nady |
last post by:
Hi,
I have a database in mysql i have column which is text and i need to convert it to date for query purposes.
the format for the string in the column is dd/mm/yyyy i need to convert this to...
|
by: satiss7pwr |
last post by:
I have a string date like this:
"3/28/2008 12:05:45 pm"
i want to convert it into date and display the out put
any one can help me plssssssssss
|
by: jdusn1978 |
last post by:
Goal: Convert text to date in a query and show only dates that are older than 60 days from Date()
I’ve searched the site and nothing quite matches what I’m looking for, at least in a way I can...
|
by: taylorcarr |
last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
|
by: aa123db |
last post by:
Variable and constants
Use var or let for variables and const fror constants.
Var foo ='bar';
Let foo ='bar';const baz ='bar';
Functions
function $name$ ($parameters$) {
}
...
|
by: ryjfgjl |
last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
| |