pasar a FechaJuliana
Hola,
Cómo puedo pasar en Access un campo char a fecha Juliana?
gracias,
Cómo puedo pasar en Access un campo char a fecha Juliana?
gracias,
Lo de fecha Juliana que es lo que es?
Prueba con la funcion CDate esta funcion te devuelve una fecha si le pasas un string(texto)
Ejemplo:
?CDate("11/01/1966")
11/01/1966
No se si sera eso lo que buscas, espero haberte ayudado.
Un saludo
Skakeo®
Prueba con la funcion CDate esta funcion te devuelve una fecha si le pasas un string(texto)
Ejemplo:
?CDate("11/01/1966")
11/01/1966
No se si sera eso lo que buscas, espero haberte ayudado.
Un saludo
Skakeo®
Norman A. Armas ([email protected])
' *********************************************************************
' FUNCTION: CJulian2Date()
'
' PURPOSE: Convert a Julian day to a date. The function works with
' dates based on the Gregorian (modern) calendar.
'
' ARGUMENTS:
' JulDay: The ordinal day of a year. Between 1 and 365 for all
' years, or between 1 and 366 for leap years.
'
' YYYY: A three or four digit integer for a year that is within the
' range of valid Microsoft Access dates. If YYYY is omitted,
' then YYYY is assumed to be the year of the current system
' date.
'
' RETURNS: A date for a valid Microsoft Access year and Julian day,
' or a Null value for an invalid Julian Day.
' *********************************************************************
Function CJulian2Date (JulDay As Integer, Optional YYYY)
If IsMissing(YYYY) Then YYYY = Year(Date)
If Not IsNumeric(YYYY) Or YYYY 1 <> YYYY Or YYYY < 100 Or YYYY _
> 9999 Then Exit Function
If JulDay > 0 And JulDay < 366 Or JulDay = 366 And _
YYYY Mod 4 = 0 And YYYY Mod 100 <> 0 Or YYYY Mod 400 = 0 Then _
CJulian2Date = DateSerial(YYYY, 1, JulDay)
End Function
' *********************************************************************
' FUNCTION: CJulian2Date()
'
' PURPOSE: Convert a Julian day to a date. The function works with
' dates based on the Gregorian (modern) calendar.
'
' ARGUMENTS:
' JulDay: The ordinal day of a year. Between 1 and 365 for all
' years, or between 1 and 366 for leap years.
'
' YYYY: A three or four digit integer for a year that is within the
' range of valid Microsoft Access dates. If YYYY is omitted,
' then YYYY is assumed to be the year of the current system
' date.
'
' RETURNS: A date for a valid Microsoft Access year and Julian day,
' or a Null value for an invalid Julian Day.
' *********************************************************************
Function CJulian2Date (JulDay As Integer, Optional YYYY)
If IsMissing(YYYY) Then YYYY = Year(Date)
If Not IsNumeric(YYYY) Or YYYY 1 <> YYYY Or YYYY < 100 Or YYYY _
> 9999 Then Exit Function
If JulDay > 0 And JulDay < 366 Or JulDay = 366 And _
YYYY Mod 4 = 0 And YYYY Mod 100 <> 0 Or YYYY Mod 400 = 0 Then _
CJulian2Date = DateSerial(YYYY, 1, JulDay)
End Function
